ID:15925606
大小:37.00 KB
页数:15页
时间:2018-08-06
3、返回a.localecompare(B);否则返回-1;});objouter=文件。getElementById(“__smandisp”)/显示的div对象objinput=文件。getElementById(objinputid);//文本框对象如果(objinput==null){警报('smanpromptlist初始化失败:没有找到”+objinputid+”文本框”);返回;}objinput.onblur=function(){objouter.style.display='none';}objinput.onkeyup=checkkeycode
4、;objinput.onfocus=checkandshow;}功能getabsoluteheight(OB){返回ob.offsetheight;}功能getabsolutewidth(OB){返回ob.offsetwidth;}功能getabsoluteleft(OB){无功s_el=0,EL=OB;当(EL){s_el=s_el+el.offsetleft;EL=el.offsetparent;};返回s_el;}功能getabsolutetop(OB){无功s_el=0,EL=OB;当(EL){s_el=s_el+el.offsettop;EL=el.o
5、ffsetparent;};返回s_el;}功能outselection(指数){objinput.value=objouter。孩子[索引]。trim()innerText;objouter.style.display='none';}功能divposition(){objouter.style.top=getabsoluteheight(objinput)+getabsolutetop(objinput);objouter.style.left=getabsoluteleft(objinput);objouter.style.width=getabsolut
6、ewidth(objinput);}功能chageselection(ISUP){如果(objouter.style.display=='none'){objouter.style.display=”;}别的{如果(ISUP)SelectedIndex++;其他的SelectedIndex--;}无功maxindex=objouter.children.length-1;如果(SelectedIndex<0){SelectedIndex=0;}如果(SelectedIndex>maxindex){SelectedIndex=maxindex;}如果(Select
7、edIndex==maxindex){SelectedIndex=1;}对于(inttmp=0;inttmp<=maxindex;inttmp++){如果(inttmp==SelectedIndex){objouter.children[inttmp].classname="sman_selectedstyle";objinput.value=objouter.children[selectedindex].innertext.trim().}else{objouter.children[inttmp].classname="";}}}checkkeycode(
8、)()vara=(doc
此文档下载收益归作者所有