这篇文章主要介绍了使用delegate方法为一个tr标签加一个链接,并规定当这些事件发生时运行的函数,需要的朋友可以参考下
$("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"); } });
以上就是使用delegate方法为一个tr标签加一个链接的详细内容,更多请关注本站其它相关文章!