使用delegate方法为一个tr标签加一个链接
更新时间:2014年06月27日 17:50:42 投稿:whsnow
这篇文章主要介绍了使用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");
}
});
相关文章
使用jquery的ajax需要注意的地方dataType的设置
没有设置dataType:'json',就出现无法解析返回的data数据,会把data当作字符串处理,而不是json对象,记得以前是不用设dataType的,很奇怪,不知道是不是跟jquery版本有关系2013-08-08


最新评论