我想在用户按下按钮关闭对话框时收到通知。我尝试了以下方法,但它不起作用:
<div id="TestDialog"/>
$("#TestDialog").dialog({
autoOpen: true,
resizable: true,
modal: true,
position: ['middle', 'middle'],
savePushed: function() {
alert('save pushed');
},
closePushed: function() {
alert('save pushed');
},
buttons: {
"Save": function() {
// alert('save');
savePushed();
$(this).dialog("close");
},
Close: function() {
//alert('close');
closePushed();
$(this).dialog("close");
}
}
});
还有其他想法吗?