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 得到更好的效果本回答被提问者采纳
<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做鼠标经过的图象
要做出更生动的按钮样式 大可以用javascript做鼠标经过的图象
第3个回答 2010-04-12
ls正解 只能用js