IP 地址输入框
作者:cmscn 日期:2007-06-16
<style>
div.IPDiv{background:#ffffff;width:120;font-size:9pt;text-align:center;border:2 ridge threedshadow;border-right:inset threedhighlight;border-bottom:inset threedhighlight;
}
input.IPInput{width:24;font-size:9pt;text-align:center;border-width:0;
}
</style>
<script language="JScript" for="document" event="onkeydown">
if(event.keyCode==13)event.keyCode=9;
</script>
<script language="JScript">
var IPlikeInputStr=[];
for(var i=0;i<4;i++)IPlikeInputStr[i]="<input class=IPInput name=IPInput type=text size=3 maxlength=3 onkeydown='if(event.srcElement.value.length==3||event.keyCode==39)event.keyCode=9'>"+(i==3?"":".");
document.write("<div class=IPDiv>"+IPlikeInputStr.join("")+"</div>");
</script>
评论: 0 | 引用: 0 | 查看次数: 589
发表评论