如何在css中编辑onmouseover事件

来源:百度知道 编辑:UC知道 时间:2024/05/20 06:44:52
如题,我想把table中的tr标签的onmouseover设上一个背景色,请问怎么写,谢谢.

给您截段代码吧 希望对您有所帮助

<style>
.button-normal
{
border:groove 1px #ffffff;
border-bottom:groove 1px #666666;
border-right:groove 1px #666666;
background-image:url(button-bg03.gif);
background-repeat:repeat-x;
background-color:Transparent;
height:20px;
event:expression(
onmouseover = function(){
this.style.backgroundColor='red'
},
onmouseout = function(){
this.style.backgroundColor='#ffffff'
}
)
}
</style>
<body>
<input type=button value="click me" class="button-normal">
</body>