打开弹出窗口在 Firefox 和 google chrome 中不起作用
我想在用户单击按钮时打开一个弹出窗口(仅带有关闭按钮),并且应禁用父窗口,直到弹出窗口关闭。为此,我使用以下代码
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 中,父窗口不会被禁用。
提前致谢
I want to open a popupwindow (with close button only) when the user clicks a button and the parent window should be disabled until the popup window closed. For that I'm using the following code
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');
}
Anyhow, this code is working perfectly in IE. But, I hav two problems.
In firefox, it is not opening with the size I've mentioned in the script. It is opening in full size. And In Google Chrome, parent window is not getting disabled.
Thanks in Advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
参数的语法不同。例如:
The syntax of the args is different. For example: