我有此代码:
$(window).bind("beforeunload", function() {
App.confirm('popup.cancel.confirmation.message', $('#confirm-import-modal'), true);
return "Do you really want to close?";
});
我对这段代码有2个问题:
我总是收到消息This page is asking you to confirm that you want to leave - data you have entered may not be saved.
,然后输入消息Do you really want to close?
App.confirm显示一个弹出窗口,是否可以仅显示此弹出窗口,而不显示来自javascript的确认默认弹出窗口?因为现在我有2个弹出窗口,其中一个默认值来自javascript,而另一个默认值则由App.confirm()
谢谢。