- 利用CSS的hover:
table tr:hover{
background: #00FFFF;
}
- 利用js的mouseover和mouseout事件:
$(document).on("mouseover",".myRow",function(){
$(this).css({
"background-color":"#00FFFF"
});
});
$(document).on("mouseout",".myRow",function(){
$(this).css({
"background-color":"#FFFFFF"
});
});