首頁  >  文章  >  web前端  >  使用delegate方法為一個tr標籤加上一個連結_jquery

使用delegate方法為一個tr標籤加上一個連結_jquery

WBOY
WBOY原創
2016-05-16 16:43:011169瀏覽
$("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");
}
});
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn