Chrome:Javascript-Window.showModal对话框不支持? [英] Chrome: Javascript-Window.showModal Dialog not supporting?

查看:140
本文介绍了Chrome:Javascript-Window.showModal对话框不支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重现问题的步骤:
1.打开模态对话框窗口使用Javascript函数'window.showmodalDialog'。
2.它不像window.showmodal的性质对话框
3.它允许访问父窗口。

Steps to reproduce the problem: 1. To Open a Modal Dialog Window Using Javascript function 'window.showmodalDialog'. 2. It does not works like the nature of window.showmodal Dialog 3. It allow to access the Parent Window.

预期的行为?
如果我打开模态窗口使用Javascript函数Window.showmodalDialog(),它应该采取所有的控制。它不应该允许访问父窗口。它适用于所有其他主要浏览器。

Expected behavior? If i Open the Modal Window using Javascript function Window.showmodalDialog(), it should take all the control. it should not allow to access the Parent Window. It works in all other Major Browsers. In Chrome, Not Supporting.

任何帮助?

任何帮助?

推荐答案

window.showModalDialog(); 方法最初是一个< a href =http://msdn.microsoft.com/en-us/library/ie/ms536759%28v=vs.85%29.aspx =nofollow> Internet Explorer专有方法,并且只有在其他浏览器中采用才能达到基本的兼容性。

The window.showModalDialog(); method was originally an Internet Explorer proprietary method and was only "adopted" in other browsers for basic compatibility purposes.

从我的经验来看,支持不是很完整,因此我强烈建议不要使用它, window.open(); 方法。

From my experience the support is not very complete and thus I would highly advise against using it and stick to the standard window.open(); method if you need a popup.

根据MDN( Mozilla开发人员网络)在Firefox和Safari中有一些支持。他们还表示,有一个努力标准化此方法为HTML5,但HTML5版本包括第三个参数选项)。

According to the MDN (Mozilla Developer Network) there is some support for this in Firefox and Safari. They also indicate that there is an effort to standardize this method for HTML5 however the HTML5 version does not include the 3rd argument "options").

WhatWG有一个规格列出此HTML5功能的状态,目前(2013年9月9日)表示浏览器目前正确实施规范并通过所有测试用例。

The WhatWG has a spec listing the status of this HTML5 feature which currently (Sept. 9, 2013) indicates that NO browser currently properly implements the spec and passes all test cases.

类似的限制适用于合作伙伴方法 window.showModelessDialog();

这篇关于Chrome:Javascript-Window.showModal对话框不支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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