失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > html文本框样式大全 HTML文本框样式(示例代码)

html文本框样式大全 HTML文本框样式(示例代码)

时间:2021-11-10 19:35:45

相关推荐

html文本框样式大全 HTML文本框样式(示例代码)

1 输入框景背景透明:2

3

4 鼠标划过输入框,输入框背景色变色:5

6 style="width: 106; height: 21"

7 οnmοuseοut="this.style.borderColor=‘black‘;this.style.backgroundColor=‘#ffffff‘"style="border-width:1px;border-color=black">

8

9 输入字时输入框边框闪烁(边框为小方型):10

11 functionborderColor(){12 if(self[‘oText‘].style.borderColor==‘red‘){13 self[‘oText‘].style.borderColor= ‘yellow‘;14 }else{15 self[‘oText‘].style.borderColor= ‘red‘;16 }17 oTime=setTimeout(‘borderColor()‘,400);18 }19

20

21

22 输入字时输入框边框闪烁(边框为虚线):23

24 #oText{border:1px dotted #ff0000;ryo:expression_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)})};25

26

27

28 自动横向廷伸的输入框:29

30

31 自动向下廷伸的文本框:32 80) this.style.posHeight=this.scrollHeight+5">输入几个回车试试

33

34 只有下划线的文本框:35

36

37 软件序列号式的输入框:38

39 if(value.length==3)document.all[event.srcElement.sourceIndex+1].select();40

41 —————

42

43 软件序列号式的输入框(完整版):44 if(value.length==maxLength)document.all[event.srcElement.sourceIndex+1].focus();

45 select();

46

47 varsn=newArray();48 for(i=0;i

52 —————

53

如果觉得《html文本框样式大全 HTML文本框样式(示例代码)》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。