首页 > 编程 > JavaScript > 正文

使用delegate方法为一个tr标签加一个链接

2019-11-20 14:23:37
字体:
来源:转载
供稿:网友
$("table").delegate("tr","click",function(e){checkbox=$(this).children().first().children()[0];alter=$(this).children().eq(8).children().children()[0];delet=$(this).children().last().children().children()[0];if(e.target!=checkbox&&e.target!=alter&&e.target!=delet){rollcall_id=$(this).children().first().children().val()open("/Student/student?sid="+rollcall_id,"mframe");}});
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表