我想将一个函数绑定到beforeunload
Javascript 中的子窗口事件。我有以下代码:
newWind = window.open(settings.url, "Dialog", "width=" + settings.width + ",height=" + settings.height + ",resizable=" + settings.resizable + ",scrollbars=" + true);
newWind.onunload = function() { alert('test'); }
在 Firefox 中运行良好,但在 IE7 中失败。谁能看到我做错了什么?