园角INPUT,INPUT选中变色?!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:v><!--此处为绘图必须//-->
<head>
<title> 输入框演示 </title>
<STYLE>v/:*{behavior:url(#default#VML);}</STYLE><!--此处为绘图必须//-->
<script>
function drawInput(id,name,type,value,event,size){
 var html = "";
 html += "<v:roundrect fillcolor='white' arcsize='0.1' strokecolor='black' strokeweight='1px' style='position:relative;top:0;left:0;width:"+(size+100)+";height:20'>";
 html += "<v:shadow on='T' type='single' color='#b3b3b3' offset='3px,3px'/>";
 html += "<v:TextBox inset='0,0,0,0' style='text-align:center;line-height:11pt;height:20'>";
 html += "<input id='"+id+"' type='"+type+"' name='"+name+"' value='"+value+"' "+event+" style='border:0px;background-color:#FFFFFF'>";
 html += "</v:TextBox></v:roundrect>";
 return html;
}
</script>
</head>

<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
 <tr><td><script>document.write(drawInput("tt","","text","text1","",30))</script></td></tr>
 <tr><td><script>document.write(drawInput("tt","","text","text2","",50))</script></td></tr>
 <tr><td><script>document.write(drawInput("tt","","text","text3","",40))</script></td></tr>
</table>
<script>
var ipt = document.getElementsByTagName("input");
for(i=0;i<ipt.length;i++){
 if(ipt[i].type == "text"){
  ipt[i].onfocus = function(){
   this.style.backgroundColor = "#99CCFF"; 
  }
  ipt[i].onblur = function(){
   this.style.backgroundColor = "#FFFFFF";
  }
 }
}
</script>
</body>
</html>

 

<script>
var ipt = document.getElementsByTagName("input");
for(i=0;i<ipt.length;i++){
 if(ipt[i].type == "text"){
  ipt[i].onfocus = function(){
   this.style.backgroundColor = "#99CCFF"; 
  }
  ipt[i].onblur = function(){
   this.style.backgroundColor = "#FFFFFF";
  }
 }
}
</script>

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值