【发布时间】:2017-11-07 14:35:31
【问题描述】:
我试图添加$tr.find('td').fadeOut(1000, function () {
$tr.remove();
单击删除按钮后删除该行,但它不起作用..
function Delete(ID) {
var ans = confirm("Are you sure you want to delete this Record?");
if (ans) {
$.ajax({
url: '@Url.Action("Delete")',
data: JSON.stringify({ ID: ID }),
async: true,
cache: false,
type: "Post",
contentType: "application/json;charset=UTF-8",
dataType: "json",
success: function (result) {
$tr.find('td').fadeOut(1000, function () {
$tr.remove();
});
//alert(result);
},
error: function (errormessage) {
alert(errormessage.responseText);
}
});
}
}
ajax 函数运行良好,该行已从数据库中删除..
【问题讨论】:
-
你怎么打电话给
Delete? -
你在哪里定义过
$tr? -
我在点击删除.. @Shyju
-
我不知道我以为我是在这样使用它时定义的,是吗?@Shyju
标签: jquery html ajax asp.net-mvc asp.net-ajax