一直没注意table的隔行换色,突然要调试一个隔行换色,于是。
function table_even_odd(){
$("#showcss table tr:odd").css("background-color","#fbfbfb");
$("#showcss table tr:even").css("background-color","#ffffff");
}
function table_css_hover(){
table_even_odd();
var tabletrbg="";
var tabletrbg="";
$("#showcss table tr").hover(
function(){
tabletrbg=$(this).css("background-color");
$(this).css("background-color","#f9f9f9");
},
function(){
$(this).css("background-color",tabletrbg);
}
);
}
小列子。分享下。
441

被折叠的 条评论
为什么被折叠?



