html<input type =botton> 如何设置鼠标经过时颜色变化

html<input type =botton> 如何设置鼠标经过时颜色变化

第1个回答  推荐于2016-09-08
<html>
<head>

<script type='text/javascript'>
function ChangeColor()
{
document.getElementById('a').style.backgroundColor="lightblue"
}
function RevertColor()
{
document.getElementById('a').style.backgroundColor="grey"
}
</script>
</head>

<body>
<input id='a' type='button' value='Testing Button' style='background:grey' onMouseOver='ChangeColor()' onMouseout='RevertColor()'></input>
</body>
</html>

可以通过onMouseOver和onMouseout来更改button的img 得到更好的效果本回答被提问者采纳
第2个回答  2010-04-11
这个是调用出默认的按钮 样式方面是不可修改的
要做出更生动的按钮样式 大可以用javascript做鼠标经过的图象
第3个回答  2010-04-12
ls正解 只能用js

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网