1、input 边框样式
<input type="text"
id=""
name=""
value="只能输入数字"
maxlength="5"
onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))"
style="border:1px solid;border-color:#00ff00;background:#ff0000" >
?
2、动态改变边框颜色
<HTML>
<HEAD>
<TITLE>鼠标移上去改变边框颜色 </TITLE>
<style type="text/css">
<!--
.output-body1{border:1px solid #ff0000;}
.output-body2{border:0px;}?
-->
</style></head>
?<BODY>
? <input type="text" id="test" value="1111111" class="output-body2" onmousemove="showborder(this)" onmouseout="hiddborder(this)">
?</BODY>
</HTML>
<script>
function showborder(obj)
{
?obj.className="output-body1";
}
?
function hiddborder(obj)
{
?obj.className="output-body2";
}?
</script>
?