输入框景背景透明:
鼠标划过输入框,输入框背景色变色:
TYPE="text" SIZE="29"
οnmοuseοver="this.style.borderColor='black';this.style.backgroundColor='plum'"
style="width: 106; height: 21"
οnmοuseοut="this.style.borderColor='black';this.style.backgroundColor='#ffffff'"
style="border-width:1px;border-color=black">
输入字时输入框边框闪烁(边框为小方型):
function borderColor(){
if(self['oText'].style.borderColor=='red'){
self['oText'].style.borderColor = 'yellow';
}else{
self['oText'].style.borderColor = 'red';
}
oTime = setTimeout('borderColor()',400);
}
οnblur="clearTimeout(oTime);">
输入字时输入框边框闪烁(边框为虚线):
#oText{border:1px dotted #ff0000;ryo:expression_r_r(ο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)})};
自动横向廷伸的输入框:
style="huerreson:expression_r_r(this.width=this.scrollWidth)"
value="abcdefghijk">
自动向下廷伸的文本框:
onpropertychange="if(this.scrollHeight>80)
this.style.posHeight=this.scrollHeight+5">输入几个回车试试
只有下划线的文本框:
软件序列号式的输入框:
if(value.length==3)document.all[event.srcElement.sourceIndex+1].select();
maxlength="3">—
size="5" maxlength="3">—
name="T" size="5"
maxlength="3">—
size="5" maxlength="3">—
name="T" size="5"
maxlength="3">—
size="5" maxlength="3">
软件序列号式的输入框(完整版):
var sn=new Array();
for(i=0;i
sn=T.value;
alert(sn.join("—"));
maxlength="3">—
size="5" maxlength="3">—
name="T" size="5"
maxlength="3">—
size="5" maxlength="3">—
name="T" size="5"
maxlength="3">—
size="5" maxlength="3">
name="Submit">