CSS Control select display Style

Source: Internet
Author: User
Tags getdate setcookie tagname ticket
Tip: You can modify some of the code before running



<p> <meta content= "text/html; charset=gb2312 "http-equiv=" Content-type "/></p> <script type=" Text/javascript "> var gTableAttr= ' Table border=0 cellspacing=0 cellpadding=0 '; User-extensible functions and variables var onclickpageself=null;//response Click on page's Custom action var onresizepageself=null; var onchangechildtypeself = null; Custom action to change subtype var onsubmitsearchself = null; Custom actions for submitting Forms//browser type var bt_ie = 0; Internet expolore var bt_ff = 1; Firefox var gdebug=0; var gfrom= ""; from var gcookieexpdays = 80; Cookie Expiration time var gbrowertype = Bt_ie; Browser type var ggetalexa = false; Whether to use Alexa bar var gfloatdivid = "Flt_div_"; Floating form ID var gfloatdivcid= ""; Floating form corresponds to ID var ginputform = null; form with input box var ginputtip = ""; Input box prompt content var gchildtypes = null; Sub-type var gcurrchild =-1 in page Current subtype//Ajax object Var Gajaxobj=null; var gajaxfiles=new Array (); var Gajaxinuse=false; gajaxfiles.length=0; Standard control Var gselecters=new Array ();//select object var glastselect=null; var Gradios=new array ();//Radio Object var gchboxs=new array ();//CheckBox object var gradioattrs=new array ("Http://static.xpfang.com/Files /img/a/radio_ch.gif "," http://static.xpfang.com/Files/img/a/radio_unch.gif "); var gchboxattrs=new Array ("Http://static.xpfang.com/Files/img/a/chbox_ch.gif", "http://static.xpfang.com/Files/ Img/a/chbox_unch.gif "); gselecters.length=0; gradios.length=0; gchboxs.length=0; var gkxcheckbox=new Array ();//New CheckBox object gkxcheckbox.length=0; Document.onclick = Onclickpage; Window.onresize = Onresizepage; To hide the floating form//Get browser type if (navigator.userAgent.indexOf ("MSIE") >= 0) {gbrowertype = Bt_ie;} else {gbrowertype = BT _FF; }//whether the Alexabar Ggetalexa = False is installed; if (Navigator.userAgent.indexOf ("Alexa") >= 0) {Ggetalexa = true;} function GE (ID) {return document.getElementById (ID );} function Cutstrbytruelen (THESTR, Nmaxlen) {var ntruelen = 0; var i; for (i = 0; i< thestr.length; i++) {if (Thestr.charat (i) > ' ~ ') Ntruelen = 2; else Ntruelen = 1; IF (Ntruelen >= nmaxlen) {thestr = Thestr.substr (0,i) + "..."; return thestr; } return THESTR; function Insertblank (str, l, N) {var s = ""; var t = ""; var i = 0; var len = str.length; for (i = 0; i < n; i++) {T + = ""; } if (Len <= l) {for (i = 0; i < len-1; i++) {s = s + str.charat (i) + t; {s + + str.charat (i); else {s = str; return s; function Gettruelen (str) {var ntruelen = 0; var i = 0; for (i = 0; i < str.length i++) {if (Str.charat (i) > ' ~ ') {Ntruelen = 2; else {Ntruelen = 1; } return Ntruelen; function Getcookieval (offset) {var endstr = document.cookie.indexOf (";", offset); if (endstr = = 1) {endstr = Document.cookie.length; Return unescape (document.cookie.substring (offset, endstr)); function GetCookie (name) {var arg = name + ' = '; var alen = Arg.length; var clen = document.cookie.length; var i = 0; var j = 0; while (I < clen) {j = i + Alen; if (document.cookie.subsTring (i, j) = = arg) return Getcookieval (j); i = Document.cookie.indexOf ("", I) + 1; if (i = = 0) break; return null; function Deletecookie (name) {var exp = new Date (); var cval = GetCookie (name); Exp.settime (Exp.gettime ()-1); Document.cookie = name + "=" + Cval + "; Expires= "+ exp.togmtstring (); function Setcookie (name, value) {var argv = setcookie.arguments; var argc = setCookie.arguments.length; var exp = (argc > 2)? ARGV[2]: gcookieexpdays; var path = (argc > 3)? ARGV[3]: null; var domain = (argc > 4)? ARGV[4]: null; var secure = (argc > 5)? ARGV[5]: false; var expires = new Date (); Deletecookie (name); Expires.settime (Expires.gettime () + (exp*24*60*60*1000)); Document.cookie = name + "=" + value +; Expires= "+ expires.togmtstring () + ((domain = null)? "" : ("; domain= "+ domain") + ((path = null)? "" : ("; Path= "+ path") + ((secure = = True)? "; Secure ":" ");} function Getdocoffsettop (s) {var t = 0;while (s) {T + = s.offsettop; s = s.offsetparent; } return t; function Getdocoffsetleft (s) {var L = 0; while (s) {L + = S.offsetleft; s = s.offsetparent; return l; function Switchscmenu (sid,did) {var s = document.getElementById (SID); var f = document.getElementById (Gfloatdivid); if (!s | |!f) {return false; } if (F.style.display = "None") {Openscmenu (sid,did); else {closefloatdiv (); } function Openscmenu (Sid,did) {var s = document.getElementById (SID); var d = document.getElementById (did); var f = document.getElementById (Gfloatdivid); var l, T; if (!s | |!f | |!d) {return false; } t = Getdocoffsettop (s) + s.offsetheight; L = Getdocoffsetleft (s); F.style.top = t; F.style.left = l; F.style.display = ""; f.innerhtml = d.innerhtml; /* Process Select control/function Switchscselect (tid,sid,iid,opts) {var f = document.getElementById (Gfloatdivid); if (!f) {return false; } if (F.style.display = "None") {Openscselect (tid,sid,iid,opts); GFloatdivcid=tid; else {closescselect (); if (Gfloatdivcid!=tid) {openscselect (tid,sid,iid,opts); Gfloatdivcid=tid; }} function Focusscselect (n, v) {var c = n.childnodes; var i = 0; Glastselect = null; For (i=0;i<c.length && glastselect==null;i++) {if (c[i].tagname) {if (c[i].tagname.tolowercase () = "TD") { if ((gbrowertype==bt_ie&&c[i].innertext==v) | | (gbrowertype==bt_ff&&c[i].textcontent = v)) {glastselect = C[i]; GLastSelect.style.background = "#CFE8FA"; } else {focusscselect (c[i], V); }}} function Openscselect (tid,sid,iid,opts) {var t = document.getElementById (TID); var s = document.getElementById (SID); var f = document.getElementById (Gfloatdivid); var l, top; var m = ""; var arrs = opts.split (' t '); var i; if (!s | |!f | |!t) {return false; } m = m + ' <table cellspacing= "1" cellpadding= "0" border= "0" class= "csr02 m01" width= "' +t.offsetwidth+ '" bgcolor= "#FFF FFF ">"; for (i= 0; i < ARRS.LENGTH/2; i++) {m = m + ' <tr><td height=20 valign=middle onmouseover= ' this.style.background=\ ' #CFE8FA \ '; if (gLastSelect& Amp;&glastselect!=this) {glastselect.style.background=\ ' #FFFFFF \ ';} glastselect=this; "onclick=" Changescselect (\ ' +sid+ ', ', \ ' +iid+ ', ', \ ' +arrs[i*2]+ ' \ ', \ ' +arrs[i*2+1]+ ' \ ') "bgcolor=" #FFFFFF "><div > ' + arrs[i*2] + ' </td></tr> '; m = m + ' </table> '; top = getdocoffsettop (t) + t.offsetheight; L = getdocoffsetleft (t); F.style.top = top; F.style.left = l; F.style.display = ""; f.innerhtml = m; Focusscselect (f, s.innerhtml); function Closescselect () {var f = document.getElementById (Gfloatdivid); if (!f) {return false; } F.style.display = "None"; function Changescselect (sid,iid,n,v) {var i = document.getElementById (IID); var s = document.getElementById (SID); var J; if (!s | |!i) {return false; } if (1) {//if (i.value!=v) {i.value = v; s.innerhtml = n; for (J=0;j<gselecters.length;j++) {if (Gselecters[j][0]==sid) {if (gselecters[j].length>1) {gselecters[j][1] (encodeURI (v)); } break; }} closescselect (); function Serializescselect (opts) {var m = ""; var i; for (i = 0; i < opts.length-1 i++) {m + + Opts[i] + "T"; } m + = Opts[i]; return m; function Printscselect (n, V, W, opts) {var outmsg = ""; var focus = -1;//var sid = "";//the ID of the div that displays the value var iid = "";//the id var tid = "" For the value hidden field, or the ID var i,j of the entire select table; for (i = 1; i > 0; i++) {sid = "_kxsel_" + i; For (j=0. j<gselecters.length;j++) {if (GSELECTERS[J][0]==SID) {break; } if (j==gselecters.length) {iid = sid + ' _i '; tid = Sid + "_t"; Break }///Save the Select attribute var item = new Array (); J=printscselect.arguments.length; if (J > 4) {for (i=4;i<j;i++) {item[i-4]=printscselect.arguments[i]; } item.unshift (SID); Gselecters[gselecters.length] = Item; Focus =-1; for (i = 0; i < OPTS.LENGTH/2; i++) { if (focus = = 1 && (v==opts[i*2+1] | | | encodeURI (v) ==opts[i*2+1])} {focus = i; } Opts[i*2+1]=decodeuri (opts[i*2+1]); } if (focus = = 1) {focus = 0; } outmsg = outmsg + ' <input type= ' hidden ' name= ' ' +n+ ' ' value= ' ' +opts[focus*2+1]+ ' "id= '" ' +iid+ ' ">"; outmsg = outmsg + ' <table cellspacing=0 cellpadding=0 border=0 height=19 width= "' +w+ '" bgcolor= "#F9FBFE" id= "' +tid+ '" C " lass= "Csr02" "onclick=" Switchscselect (\ ' +tid+ ', ', \ ' +sid+ ' \ ', \ ' +iid+ ' \ ', \ ' +serializescselect ') + ' \ '); Event.cancelbubble=true; " > '; outmsg = outmsg + ' <tr height=17 valign=bottom><td align= "left" ><div id= "' +sid+ '" > ' +opts[focus*2]+ ' & LT;/DIV></TD><TD width= "background=" Selarrow.gif "></td></tr>"; outmsg = outmsg + ' </table> '; return outmsg; //Handle floating form function Createfloatdiv () {document.write (' <div id= ' +gfloatdivid+ ' "></div> ');} function Clos Efloatdiv () {var f = document.getElementById (Gfloatdivid); if (f) { F.style.display = "None"; The function onclickpage () {///closes the floating window closefloatdiv (); if (onclickpageself!= null) {onclickpageself (); }} function Onresizepage () {if (onresizepageself!=null) {onresizepageself ();} Onclickpage (); function Printscradio (n, V, opts, St) {var m= ""; var focus=-1; var Rid,iid,imgid; var l=opts.length/2; var i,j; Rid=iid=imgid= ""; for (i=1;i>0;i++) {rid= "_kxradio_" +i; for (j=0;j<gradios.length;j++) {if (Gradios[j][0]==rid) {break; } if (j==gradios.length) {iid=rid+ ' _i '; Break }///Save Radio Property var item=new Array (); var vs= ""; J=printscradio.arguments.length; if (j>4) {for (i=4;i<j;i++) {item[i-4]=printscradio.arguments[i]; } item.unshift (RID); Gradios[gradios.length]=item; Focus=-1; for (i=0;i<l;i++) {if (Focus==-1 && (v==opts[i*2+1) | | encodeURI (v) ==opts[i*2+1])) {focus=i; } Opts[i*2+1]=decodeuri (opts[i*2+1]); } if (focus==-1) {focus=0; } vs=serializescradio (opts);m=m+ ' <input type= ' hidden ' name= ' +n+ ' value= ' ' +opts[focus*2+1]+ ' ' id= ' ' +iid+ ' ' > '; m=m+ ' <table cellspacing=0 cellpadding=0 border=0><tr> '; for (i=0;i<l;i++) {imgid=rid+ ' _img ' +i; m=m+ ' <td onclick= ' Changescradio (\ ' +rid+ ', ' +i+ ', \ ' +vs+ '); " class= "' +gradioattrs[2]+ '" ><table cellspacing=0 cellpadding=0 border=0><tr><td valign=top> <img src= "alt=" CSS control select display style-select style beautify css "></td><td width=4></td><td class=" ' +st+ ' "> ' +opts[i*2]+ ' </td></tr></table></td>"; if (i!=l-1) {m+= ' <td width=8></td> ';} } m=m+ ' </tr></table> '; Return (m); function Serializescradio (opts) {var m= ""; var l=opts.length/2; var i; for (i=0;i<l-1;i++) {m+=opts[i*2+1] + ' \ t '; } M+=opts[i*2+1]; return m; function Changescradio (RID, idx, Optvs) {var P=document.getelementbyid (rid+ ' _i '); var s,v; var vs=optvs.split (' t '); var i,j; if (!p) {return; for (i=0;i<vs.length;i++) {imgid=rid+ ' _img ' +i; S=document.getelementbyid (Imgid); if (s) {if (idx==i) {s.src=gradioattrs[0]; if (P.value!=vs[i]) {for (j=0;j<gradios.length;j++) {if (Gradios[j][0]==rid) {if (gradios[j].length>1) {gradios[j][1] (encodeURI (vs[i)); } break; }} P.value=vs[i]; }}else{s.src=gradioattrs[1]; }}else{}} function Printsccheckbox (n,t,cv,uncv,v,st) {var m= ""; var Cid,iid,imgid; var i,j; Cid=iid=imgid= ""; for (i=1;i>0;i++) {cid= "_kxchbox_" +i; for (j=0;j<gchboxs.length;j++) {if (gchboxs[j][0]==cid) {break; } if (j==gchboxs.length) {iid=cid+ ' _i '; imgid=cid+ ' _img '; Break }//Save CheckBox Property var item=new Array (); J=printsccheckbox.arguments.length; if (j>6) {for (i=6;i<j;i++) {item[i-6]=printsccheckbox.arguments[i]; } item.unshift (CID); Gchboxs[gchboxs.length]=item; m+= ' <input type=hidden name= "' +n+ '" value= "' + (V?CV:UNCV) + '" id="' +iid+ '" > "; m+= ' <table cellspacing=0 cellpadding=0 border=0><tr valign=middle onclick= ' ChangeScCheckbox (\ ' +cid+ ' \ ', \ ' ' +cv+ ', ', \ ' +uncv+ ' '); > '; m+= ' <td><img src= ' + (v?gchboxattrs[0]:gchboxattrs[1]) + ' id= ' ' +imgid+ ' ></td><td </TD><TD class= "' +st+ '" > ' +t+ ' </td> '; m+= ' </tr></table> '; Return (m); function Changesccheckbox (CID,CV,UNCV) {var S=document.getelementbyid (cid+ ' _i '); var Img=document.getelementbyid (cid+ ' _img '); var i; if (!s | |!img) {return; } var V=s.value; if (V==CV) {S.VALUE=UNCV; IMG.SRC=GCHBOXATTRS[1]; }else{S.VALUE=CV; Img.src=gchboxattrs[0]; for (i=0;i<gchboxs.length;i++) {if (gchboxs[i][0]==cid) {if (gchboxs[i].length>1) {gchboxs[i][1] (s.value); } break; }} function Kxcheckboxcontent (t) {var m= ""; var imgp= ""; if (t.disable) {imgp=t.disimg; }else if (t.value==t.chvalue) {imgp=t.chimg; }else{imgp=t.unchimg; } m+= ' <input type=hIdden name= "' +t.name+ '" value= "' +t.value+ '" > "; m+= ' <table cellspacing=0 cellpadding=0 border=0><tr ' + (valign=middle ""? ' t.title!= "' title= '" ': ') + (t.disable? ': ' onclick= ' Kxcheckboxonchange (' +t.index+ ') ') + ' > '; m+= ' <td><img src= "' +imgp+ '" id= "' +t.imgid+ '" ></td><td width=4></td><td ' + (T.style != "" "class=" ' +t.style+ ' "':" ") + ' > ' +t.text+ ' </td> '; m+= ' </tr></table> '; Return (m); function Kxcheckbox (name, text, title, CHV, UNCHV, value, Style, func) {var i,j,n; for (i=0;i<100;i++) {n=name+ (i==0? "":(. " +i)); for (j=0;j<gkxcheckbox.length;j++) {if (gkxcheckbox[j].name==n) {break;}} if (j==gkxcheckbox.length) {break;} } this.index=gkxcheckbox.length; Gkxcheckbox[this.index]=this; This.title=title; This.text=text; This.name=n; This.value=value; THIS.CHVALUE=CHV; THIS.UNCHVALUE=UNCHV; This.onchange=func; This.style = style; This.disable=false; This.chimg= "Http://static.xpfang.com/Files/img/a/chBox_ch.gif "; This.unchimg= "Http://static.xpfang.com/Files/img/a/chbox_unch.gif"; This.disimg= "Http://static.xpfang.com/Files/img/a/chbox_dis.gif"; this.imgid=this.name+ ' _img '; This.content=kxcheckboxcontent (this); function Kxcheckboxonchange (idx) {var t=gkxcheckbox[idx]; var Img=document.getelementbyid (T.imgid); var Bsel; if (t.value==t.chvalue) {t.value=t.unchvalue; img.src=t.unchimg; Bsel=false; else {t.value=t.chvalue; img.src=t.chimg; Bsel=true; } if (T.onchange) {t.onchange (Bsel); } function Kxcheckboxchange (idx,value) {var t=gkxcheckbox[idx]; if (t.disable) {return false; } var I=document.getelementbyid (T.imgid); T.value=value; if (value==t.chvalue) {i.src=t.chimg; else {i.src=t.unchimg; } function Kxcheckboxdisable (idx,v) {GKXCHECKBOX[IDX].DISABLE=V}//Submit form Action function Onsubmitsearch () {if (document . S.q.value = = Ginputtip) {document.s.q.value = ""; var cid=getcurrchildid (); if (cid== ' Hr ' | | | cid== ' Hrcampus ') {varv = document.s.vfrom.value; if (v!= ') {document.s.from.value=v; } if (onsubmitsearchself!= null) {return (onsubmitsearchself ()); return true; } function Onchangechildtype (CID) {var i; for (i = 0; i < gchildtypes.length-1 i++) {if (cid = = gchildtypes[i][chidx_id]) {break; } if (I==gcurrchild.length-1 | | gcurrchild==i) {return; //Change the current selected object gcurrchild = i; Change the input box to hint if (document.s.q.value==ginputtip) {document.s.q.value = Gchildtypes[i][chidx_tip]; } Ginputtip = Gchildtypes[i][chidx_tip]; Document.s.t.value = Gchildtypes[i][chidx_type]; if (gsuguri!=undefined) {gsuguri= '/t_suggestion.city_ ' +gfrom+ '. Channel_ ' +gchildtypes[i][chidx_type]+ '. Suggestion_ '; Gsugcache=new Object (); } var Fcat=document.s.cat; Fcat.value = ""; Switch (CID) {case ' Hr ': break; Case ' Hrcampus ': Fcat.value = "1"; Break Case ' Teacher ': break; Case ' Student ': break; Case ' Rentsale ': fcat.value = "Sale"; Break Case ' rentbuy ':Fcat.value = "buy"; Break Case ' Housesale ': fcat.value = "Sale"; Break Case ' housebuy ': fcat.value = "buy"; Break Case ' Ticketsale ': fcat.value= "Sale"; Break Case ' ticketbuy ': fcat.value= "buy"; Break Case ' Pinche ': fcat.value = "Sale"; Break Case ' Pinchenone ': fcat.value = "buy"; Break Case ' Findboy ': fcat.value= ' buy '; Break Case ' Findgirl ': fcat.value= ' sale '; Break Case ' car ': fcat.value= ' sale '; Break Default:break; }//Response user Custom Procedure if (onchangechildtypeself!= null) {onchangechildtypeself (CID); } function Ajaxgetobj () {var obj=null; if (window. XMLHttpRequest) {obj=new XMLHttpRequest (); else {obj=new ActiveXObject ("Microsoft.XMLHTTP"); return (obj); The function Ajaxongetfile () {if (gajaxobj = = null) {return false; } if (Gajaxobj.readystate!= 4) {return false; } if (Gajaxfiles.length > 0) {gajaxfiles[0][1] (gajaxobj.responsetext); Gajaxfiles.shift (); } gajaxinUse = false; if (Gajaxfiles.length > 0) {ajaxgetnextfile (); }} function Ajaxgetnextfile () {if (gajaxobj==null) {gajaxobj=ajaxgetobj (); } if (!gajaxinuse) {Gajaxobj.open ("get", gajaxfiles[0][0], true); Gajaxobj.onreadystatechange=ajaxongetfile; Gajaxobj.send (NULL); Gajaxinuse = true; } function Ajaxgetfile (Fpath, func) {gajaxfiles[gajaxfiles.length] = new Array (Fpath, func); Ajaxgetnextfile (); function Ajaxgetnull (str) {} function Kxlogclick (FID) {ajaxgetfile ('/files/null.htm?fromid= ' +fid, ajaxgetnull);} function Kxgetdefchannel () {return "Ticket"; var d=new Date (); var dt= (d.gethours ()) *60+ (D.getminutes ()) *1; var yt= (D.getmonth () +1) *31+ (D.getdate ()) *1; if ((dt>=11*60+30 && dt<=12*60+30) | | (dt>=17*60+30 && dt<=18*60+30)) {//restaurant return "Res"; }else if (dt>=0 && dt<=9*60) | | (dt>=22*60 && dt<=24*60)) {//friend return "Friend"; }else if (yt>=12*31+20 && yt<=13*31) | | (yt>=0 && yt<=2*31) | | (yt>=4*31+20 && yt<=5*31) | | (yt>=9*31+20 && yt<=10*31)) {//ticket return "Ticket"; }else{return "Rent"; } function Initmoztextoverflow (obj) {function re_render () {domoztextoverflow (obj); } settimeout (re_render,0); function domozchangeclassname (obj, CNAME) {var c=obj.classname; var n=new Array (); var i,j; C=c.split ("); for (i=0,j=c.length-1;i<=j;) {for (; c[i]!= ' _textoverflow ' && c[i]!= ' _textunderflow ' && i<=j;i++ ){;} for (;(c[j]== ' _textoverflow ' | | | c[j]== ' _textunderflow ') && i<=j;j--) {;} if (i<j) {c[i]=c[j]; i++; j--; }} C[i]=cname; c.length=i+1; Obj.classname=c.join ("); function Domoztextoverflow (obj) {function _overflow (e) {var el = e.currenttarget; Domozchangeclassname (el, "_textoverflow"); function _underflow (e) {var el = e.currenttarget; Domozchangeclassname (el, "_textunderflow"); } domozchangeclassname (obj, "_textunderflow"); Obj.addeventlistener ("Overflow", _overflow, false); Obj.addeventlistener ("Underflow", _underflow, false); Obj.ins = document.createelement ("ins"); Obj.ins.innerhtml= " "; Obj.appendchild (Obj.ins); function Getticketdatearray () {var r=new Array (); var d=new Date (); var i; for (i=0;i<20;i++) {r[r.length]= (D.getmonth () +1) + "month" +d.getdate () + "number"; R[r.length]= (D.getmonth () +1) + "M" +d.getdate (); D.settime (D.gettime () + 24*60*60*1000); } return R; function Tableblankheight (n) {//null line return to a specified height in table (' <tr height= ' +n+ ' ><td></td></tr> '); } function Kxaddfavorite (Title,url) {if (Window.sidebar && "Object" ==typeof (Window.sidebar) && " Function "==typeof (Window.sidebar.addPanel)) {Window.sidebar.addPanel (title, URL," "); }else if (document.all && "Object" ==typeof (window.external)) {window.external.addFavorite (URL, title); } function Opencitylist (obj) {var D=document.getelementbyid (' _kxmorecity '); if (d) {if (d). style.display== ' None ') {d.style.top=getdocoffsettop (obj) +obj.offsetheight+2; D.style.left=getdocoffsetleft (obj) +obj.offsetwidth-390; D.style.display= '; }else{d.style.display= ' None '; return false; return true; function Opencitylistticket (obj) {var D=document.getelementbyid (' _kxmorecity2 '); if (d) {if (d.style.display== ' None ') {d.style.top=getdocoffsettop (obj) +obj.offsetheight; D.style.left=getdocoffsetleft (obj) +obj.offsetwidth-285; D.style.display= '; Document.onmousemove=closecitylistticket; } return true; function Closecitylistticket (e) {var d=ge (' Qboxa '); var f=ge (' _kxmorecity2 '). style; var x,y,l,t,w,h; if (gbrowertype==bt_ff) {X=e.pagex; Y=e.pagey; }else{e=window.event; x=e.x; Y=e.y; } l=getdocoffsetleft (d); T=getdocoffsettop (d); W=d.offsetwidth; H=d.offsetheight; if (x>=l && x<l+w && y>=t && y<t+h) {return;} L=parseint (F.left); T=parseint (F.top); W=parseint (F.width); H=parsEint (F.height); if (x>=l && x<l+w && y>=t && y<t+h) {return;} F.display= ' None '; Document.onmousemove=null; function Opencitylisthr (obj) {var D=document.getelementbyid (' _kxmorecity3 '); if (d) {if (d.style.display== ' None ') {d.style.top=getdocoffsettop (obj) +obj.offsetheight; D.style.left=getdocoffsetleft (obj) +obj.offsetwidth-180; D.style.display= '; Document.onmousemove=checkcitylisthr; } return true; function Checkcitylisthr (e) {var d=ge (' Qboxe '); var f=ge (' _kxmorecity3 '). style; var x,y,l,t,w,h; if (gbrowertype==bt_ff) {X=e.pagex; Y=e.pagey; }else{e=window.event; x=e.x; Y=e.y; } l=getdocoffsetleft (d); T=getdocoffsettop (d); W=d.offsetwidth; H=d.offsetheight; if (x>=l && x<l+w && y>=t && y<t+h) {return;} L=parseint (F.left); T=parseint (F.top); W=parseint (F.width); H=parseint (F.height); if (x>=l && x<l+w && y>=t && y<t+h) {return;} F.dispLay= ' None '; Document.onmousemove=null; function Closecitylisthr () {GE (' _kxmorecity3 '). style.display= ' none ';} function selectcityhr (obj) { Document.s.vfrom.value = obj.innerhtml; Closecitylisthr (); } </script><script type= "Text/javascript" > Function Filterloadresult () {} function gv () {alert (document.f Form. Cat1.value+ ' +document.fform.cat2.value); } </script> <p><style type= "Text/css" > <!--body,td,th {font-size:12px;}. m01 {Border-top-widt h:1px; border-right-width:1px; border-bottom-width:1px; border-left-width:1px; Border-top-style:solid; Border-right-style:solid; Border-bottom-style:solid; Border-left-style:solid; Border-top-color: #B9C2DF; Border-right-color: #8A99C9; Border-bottom-color: #8A99C9; Border-left-color: #B9C2DF; }--></style></p> <form name= "Fform" > <script language= "javascript" > Createfloatdiv (); document.write ("Cat1", "0", "Printscselect", New Array ("All Huxing", "0", "1 rooms","1%e5%ae%a4", "Room 2", "2%e5%ae%a4", "Room 3", "3%e5%ae%a4", "4 Rooms", "4%e5%ae%a4"), Filterloadresult); document.write (Printscselect) ("Cat2", "0", 180, new Array ("All Price", "0", "0-500 Yuan", "500%e5%85%83", "500-1000 Yuan", "1000%e5% 85%83 "," 1000-1500 Yuan "," 1500%e5%85%83 "," 1500-2500 Yuan "," 2500%e5%85%83 "," 2500-3500 Yuan "," 3500%e5%85%83 "," 3500-5000 Yuan "," 5000%e5%85%83 "," 5000-7500 Yuan "," 7500%e5%85%83 "," 7500-10000 Yuan "," 10000%e5%85%83 "," 10000 yuan above "," 20000%e5%85%83 "), Filterloadresult)); </script><input type= "button" onclick= "GV ()"/><input name= "AA" type= "text"/> </form>


Tip: You can modify some of the code before running
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.