window.showModalDialog与window.open [英] window.showModalDialog vs. window.open

查看:164
本文介绍了window.showModalDialog与window.open的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当你想使用window.showModalDialog函数时有什么情况?它接缝你可以使用window.open函数和删除一些chrome(导航,地址栏等等)的一些参数完全相同。

What are situation when you want to use window.showModalDialog function? It seams that you can do exactly the same with window.open function and few parameters that remove some of the chrome (navigation, addressbar, etc...)

什么时候会你想使用window.showModalDialog和window.open吗?

When would you want to use window.showModalDialog and window.open?

推荐答案

模态对话框是父母一旦打开的对话框,在对话框关闭之前不允许你专注于父对象。

Modal dialogs are dialogs that once opened by the parent, do not allow you to focus on the parent until the dialog is closed.

人们可以使用模态对话框来登录表单,编辑表单等,你想要有一个用户交互的弹出框,但是不允许用户返回到打开弹出窗口的窗口。

One could use a modal dialog for a login form, edit form, etc where you want to have a popup for user interaction but not allow the user to return to the window that opened the popup.

作为旁注,我相信只有Internet Explorer实现 window.showModalDialog ,所以这种限制了你对它的使用。

As a side note, I believe only Internet Explorer implementes window.showModalDialog, so that kind of limits your usage of it.

这篇关于window.showModalDialog与window.open的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆