void(document.body.innerHTML.replace(/"return DeletePost\((\d+),([^"]+)\)"/g, function () {
var thatArguments = arguments;
$.ajax({
type: 'POST',
dataType: 'json',
contentType: 'application/json',
url: 'post/delete',
data: '{postId:' + arguments[1] + '}',
success: function (data) {
console.log(thatArguments[1], thatArguments[2], '删除成功.')
}
});
return arguments[0];
}));

posted on 2017-05-01 10:36  supermanlee  阅读(100)  评论(0)    收藏  举报