用鼠标感应来改变某个按钮的CSS属性

12/19/2007来源:网页特效人气:4556

<!-- 把如下代码加入<body>区域中 -->
<input type="button" value="移过来试试" style="border:1 black solid;background:#f4f4f4" onmouSEOver="tst(this,'red','#ffffff')" onmouseout="tst(this,'black','#f4f4f4')">
<script>
function tst(obj0,obj1,obj2){
obj0.style.border="1 "+obj1+" solid";
obj0.style.background=obj2;
}
</script>