我想从我的视图中删除数据,但我无法使用此代码删除这是我的 jquery 代码...
$(".deleteimage").click(function (e) {
var url = $(this).parent().attr('href');
$("#dialog-delete").dialog({
resizable: false,
height: 180,
width: 300,
show: { effect: 'drop', direction: "up" },
modal: true,
draggable: false,
open: function (event, ui) {
$(this).load(url);
},
buttons: {
"OK": function () {
$(this).remove;
}, "Cancel": function () {
$(this).dialog("close");
}
},
close: function (event, ui) {
$(this).dialog('close');
}
});
$("#dialog-delete").dialog('open');
return false;
});
这是我的删除操作方法
@(new HtmlString(@Ajax.ImageActionLink("../../Content/images/grid/Del.png", "Delete", "Delete", "Delete", new { id = item.TerminalID }, "deleteimage", new AjaxOptions
{
HttpMethod = "GET",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "targetdiv"
})))
<div id="dialog-edit"></div>
<div id="dialog-delete" style="display:none"></div>
有人可以建议我在这方面有什么错误吗....