×

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

作者:cidy20172018.02.23来源:Web前端之家浏览:9531评论:0
关键词:JQueryJS

使用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");
    }
});

您的支持是我们创作的动力!
温馨提示:本文作者系 ,经Web前端之家编辑修改或补充,转载请注明出处和本文链接:
https://jiangweishan.com/article/svg1488124800855.html

网友评论文明上网理性发言 已有0人参与

发表评论: