【发布时间】:2013-11-18 09:19:06
【问题描述】:
我在我的 ASP .NET MVC 3 应用程序中使用 jQuery 模态对话框,当用户单击 jQueryUI 模态对话框的关闭按钮 (X) 时,我想调用一个简单的 jquery 函数
在我看来我该如何处理
"Cancel": function () {
$('#divAddRecord').html('');
$(this).dialog("close");
}
我在单击取消按钮时执行此操作,我希望在用户单击关闭 (X) 按钮时执行相同操作
【问题讨论】:
-
hide: { alert('modal closing'); }你可以在 jquery ui 对话框的文档中看到这个。 -
您可以在将按钮添加到对话框时添加单击事件处理程序:按钮:[ { text: "Close", click: function() { $( this ).dialog( "close" ) ;myfunction(); } } ]
标签: jquery asp.net-mvc-3