您好,欢迎来到希系情感。
搜索
您的当前位置:首页运用jquery实现table单双行不同显示并能单行选中_jquery

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

来源:希系情感


代码如下:
$(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

Copyright © 2019- xixiwg.cn 版权所有

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务