我需要一个关于ShowModalDialog和setTimeout的函数,所以我测试了Google Chrome中的弹出窗口 和ModalDialog,并且出现了一些问题。 有显示在页面load.one由winodw.open开了两个弹出窗口(), 另一个是由window.showmodaldialog()这样打开:两个弹出窗口被打开在chrome中使用setTimeout和showModalDialog会阻止选项卡
setTimeout(function(){window.open("PopupWindow.html","_blank","")},100);
setTimeout(function(){window.showModalDialog("ModalDialog.html","","")},100)};
后,我点击PupupWindow.html上的按钮。它会调用 的功能如下:
function test()
{
setTimeout(function(){alert("test");},1000);
}
这是谷歌浏览器14做工精细。将Google Chrome更新到版本19, 后,在调用test()之前PopupWindow.html将挂起,直到ModalDialog.html关闭。 请告诉我为什么这个案例在Google Chrome 19上遭到破坏,或者在Google Chrome 19上以任何方式执行showModalDialog 和window.open()19.感谢您的帮助。