1、HTML文本框样式大全(2011-10-18 15:27:01) 转载标签: 杂谈输入框景背景透明:鼠标划过输入框,输入框背景色变色:输入字时输入框边框闪烁(边框为小方型):function borderColor()if(selfoText.style.borderColor=red)selfoText.style.borderColor = yellow;elseselfoText.style.borderColor = red;oTime = setTimeout(borderColor(),400); 输入字时输入框边框闪烁(边框为虚线):#oTextborder:1px dotted
2、 #ff0000;ryo:expression_r(onfocus=function light ()with(document.all.oText)style.borderColor=(style.borderColor=#ffee00?#ff0000:#ffee00);timer=setTimeout(light,500);,onblur=function()this.style.borderColor=#ff0000;clearTimeout(timer);自动横向廷伸的输入框:自动向下廷伸的文本框:80) this.style.posHeight=this.scrollHeight+5输入几个回车试试只有下划线的文本框:软件序列号式的输入框:if(value.length=3)document.allevent.srcElement.sourceIndex+1.select();软件序列号式的输入框(完整版):if(value.length=maxLength)document.allevent.srcElement.sourceIndex+1.focus();select();var sn=new Array();for(i=0;iT.length;i+)sn=T.value;alert(sn.join();