html5怎⽂本框样式,input输⼊框的各种样式
输⼊框景背景透明:
⿏标划过输⼊框,输⼊框背景⾊变⾊:
οnmοuseοut="this.style.borderColor='black';this.style.backgroundColor='#ffffff'" >
输⼊字时输⼊框边框闪烁(边框为⼩⽅型):
function borderColor(){
if(self['oText'].style.borderColor=='red'){
self['oText'].style.borderColor = 'yellow';
}else{
self['oText'].style.borderColor = 'red';
}
oTime = setTimeout('borderColor()',400);
}
输⼊字时输⼊框边框闪烁(边框为虚线):
#oText{border:1px dotted #ff0000;ryo:expression(οnfοcus=function light (){with(document.all.oText){style.borderColor= (style.borderColor=="#ffee00"?"#ff0000":"#ffee00");timer=setTimeout(light,500);}},οnblur=function()
{this.style.borderColor="#ff0000";clearTimeout(timer)})};
⾃动横向廷伸的输⼊框:
⾃动向下廷伸的⽂本框:输⼊⼏个回车试试
只有下划线的⽂本框:
软件序列号式的输⼊框:
if(value.length==3)document.all[event.srcElement.sourceIndex+1].select();
—————
软件序列号式的输⼊框(完整版):
var sn=new Array();
for(i=0;i
sn=T.value;
alert(sn.join("—"));
html怎样设置文本框输入输出—————

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。