$(document).read(function(){
//删除行
$(".del").click(function(){
$(this).parent().parent().remove();
});
//通过live()方法附加的事件,不仅适合当前元素,对于通过脚本添加的元素同样适用
$(".del").live("click",function(){
$(this).parent().parent().remove();
});
})
$(document).read(function(){
//删除行
$(".del").click(function(){
$(this).parent().parent().remove();
});
//通过live()方法附加的事件,不仅适合当前元素,对于通过脚本添加的元素同样适用
$(".del").live("click",function(){
$(this).parent().parent().remove();
});
})
原文:http://www.cnblogs.com/atlj/p/8059130.html