function delHandler(){
var user_id = $(this).attr("dataid");
var meButton = $(this);
$.post("{:U(postdel)}",{userid:user_id},function(res){
if("ok" == res){
$('meButton').parent().parent().remove();
}else{
alert('删除失败');
}
});
}
http://www.cnblogs.com/wcc731546227/p/5731450.html
1、在if判断中$('meButton'),由于你在函数的开始定义了meButton,所以直接meButton.parent().parent().remove();
2、如果res返回成功,就说明后台已经删除数据,在if('ok' == res){ window.reload(); }重新刷新页面就可以。不用再前端去改变DOM树,再渲染。