一、隔行换色
复制代码 代码如下:
$("tr:odd").css("background-color","#eeeeee");
$("tr:even").css("background-color","#ffffff");
复制代码 代码如下:
$("table tr:nth-child(odd)").css("background-color","#eeeeee");
复制代码 代码如下:
$("tr").live({
mouseover:function(){
$(this).css("background-color","#eeeeee");
},
mouseout:function(){
$(this).css("background-color","#ffffff");
}
})
复制代码 代码如下:
$("tr").bind("mouseover",function(){
$(this).css("background-color","#eeeeee");
})
$("tr").bind("mouseout",function(){
$(this).css("background-color","#ffffff");
})
新闻热点
疑难解答
图片精选