2010-01-27 50 views
1

我想打开一个popupwindow(只有关闭按钮),当用户单击一个按钮时,父窗口应该被禁用,直到弹出窗口关闭。为此,我使用以下代码打开弹出窗口不能在Firefox和谷歌浏览器中工作

function popup_window(url) { 

    popupwin = window.showModalDialog(url,null,'height=20,width=150,status=no,resizable=no,scrollbars=no,toolbar=no,location=no,menubar=no');  
    } 

无论如何,此代码在IE中完美运行。但是,我有两个问题。 在Firefox中,它不是以我在脚本中提到的大小打开的。它全尺寸开放。在Google Chrome中,父窗口未被禁用。

由于提前

回答

1

syntax of the args是不同的。例如:

window.showModalDialog(url, null, 
"dialogwidth: 150; dialogheight: 20; resizable: no") 
+0

我试过..在Firefox中正常工作。但是,现在IE的规模变得太大了。 – Nila 2010-01-27 06:50:49

相关问题