在确认框中单击取消会关闭我的父窗口。我希望取消它应该留在同一页面上。我为此编写了以下代码。
function closeEditorWarning(){
var r=confirm("This will close all the opened windows of application.Do you want to continue.");
if (r==true)
{
for (var i=0;i<childWindow.length;i++) {
if (childWindow[i] && !childWindow[i].closed)
childWindow[i].close();
}
self.close();
}
else
{
}
}
window.onbeforeunload = closeEditorWarning;