一、隔行換色 
復制代碼 代碼如下:
 
$("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"); 
}) 
新聞熱點
疑難解答
圖片精選