欢迎来到天天文库
浏览记录
ID:8969352
大小:42.50 KB
页数:5页
时间:2018-04-13
《js表单提示效果代码(dldtdd结构)》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、JS表单提示效果代码(dl/dt/dd结构)JS表单提示效果代码(dl/dt/dd结构dl
2、{font:normal12px/15pxArial;position:relative;width:350px;}dt{clear:both;float:left;width:130px;padding:4px02px0;text-align:left;}dd{float:left;width:200px;margin:008px0;padding-left:6px;}/*ThehinttoHideandShow*/.hint{display:none;position:absolute;right:-250p
3、x;width:200px;margin-top:-4px;border:1pxsolid#c93;padding:10px12px;/*tofixIE6,Ican'tjustdeclareabackground-color,Imustdoabgimage,too!SoI'mduplicatingthepointer.gifimage,andpositioningitsothatitdoesn'tshowupwithinthebox*/background:#ffcurl("http://51xuediannao
4、.com/uploads/soft/texiao/biaodantishi/ico01.gif")no-repeat-10px5px;}/*Thepointerimageishaddedbyusinganotherspan*/.hint.hint-pointer{position:absolute;left:-10px;top:5px;width:10px;height:19px;background:url("http://51xuediannao.com/uploads/soft/texiao/biaodan
5、tishi/ico01.gif")lefttopno-repeat;}functionaddLoadEvent(func){varoldonload=window.onload;if(typeofwindow.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}functionprepareInputsFor
6、Hints(){varinputs=document.getElementsByTagName("input");for(vari=0;i7、e.getElementsByTagName("span")[0].style.display="inline";}//whenthecursormovesawayfromthefield,hidethehintinputs[i].onblur=function(){this.parentNode.getElementsByTagName("span")[0].style.display="none";}}}//repeatthesametestsasaboveforselectsvarselects=docum8、ent.getElementsByTagName("select");for(vark=0;k
7、e.getElementsByTagName("span")[0].style.display="inline";}//whenthecursormovesawayfromthefield,hidethehintinputs[i].onblur=function(){this.parentNode.getElementsByTagName("span")[0].style.display="none";}}}//repeatthesametestsasaboveforselectsvarselects=docum
8、ent.getElementsByTagName("select");for(vark=0;k
此文档下载收益归作者所有