源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

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

  • 时间:2021-11-22 21:02 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:运用jquery实现table单双行不同显示并能单行选中
[u]复制代码[/u] 代码如下:
$(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
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部