运用jquery实现table单双行不同显示并能单行选中

复制代码 代码如下:
$(document).ready(function(){
$("p:odd").css("background-color", "#bbf");
$("p:even").css("background-color","#ffc");
$("p").click(function () {
$("p").each(function(){
if($(this).hasClass("highlight")){
$(this).removeClass("highlight");
}});
$(this).addClass("highlight");
});
});

源码参考gamil:test_jquery_table

JavaScript技术运用jquery实现table单双行不同显示并能单行选中,转载需保留来源!

郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。