×

鼠标放到按钮上后,按钮变色又变字

Kalet Kalet 发表于2009-03-20 12:00:14 浏览266 评论0

抢沙发发表评论

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
hexColor = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];鼠标放到按钮上后,按钮变色又变字
function mOver() {
for (i = 0; i < 13; i++) {
setTimeout('document.myForm.button.style.background = "#'+hexColor[12-i]+'0'+hexColor[12-i]+'0c0";', i * 40);
   }
}
function mOut() {
document.myForm.button.value = "去3lian素材";
for (i = 0; i < 12; i++) {鼠标放到按钮上后,按钮变色又变字
setTimeout('document.myForm.button.style.background = "#'+hexColor[i]+'0'+hexColor[i]+'0c0";', i * 40);
   }
}
//  End -->
</script>
<form name=myForm>
<input type=button name=button value="鼠标放过来吧!" onMouseOver='mOver()'' onMouseDown='document.myForm.button.value="   谢谢   "'

鼠标放到按钮上后,按钮变色又变字

插入到<body></body>间的代码:



群贤毕至

访客