javascript - Window.open location =no 不起作用

标签 javascript

我需要在我的网络应用程序中创建一个弹出窗口来加载一个统一文件。为此,我使用 Javascript 的 Window.Open。​​

我不希望用户看到弹出窗口的 URL 或让他有机会更改 URL。

根据这个链接:

http://javascript.about.com/library/blpopup10.htm

"location can be set to yes or no to indicate whether or not the new window should display the location or address bar. Note that this is a recommendation only as some browsers such as Firefox can disable this to ensure that the toolbar will always appear. In IE7 this setting controls whether or not the navigation bar will be displayed as the address bar will always display in that browser. "

我不再有机会从 IE7 中删除该位置。 我试图将它设置为 location =no(和 =0),实际上它在 IE7/8 或 Firefox 中不起作用。它适用于 Safari。

既然我们都遇到过那些没有 URL 栏(称为位置栏)的无聊垃圾邮件弹出窗口,那就证明一定有办法! 希望有人有正确的答案。

谢谢。

问候, 布鲁诺。

最佳答案

内联弹出窗口怎么样?您可以编写自己的代码或查看此代码:http://docs.jquery.com/UI/Dialog .

我根本不使用标准的 window.open javascript 函数,因为在 IE 8 中,恕我直言,隐藏位置栏是不可能的。

内联(我指的是 html)对话框比 window.open 具有更多的功能。

希望对您有所帮助。

关于javascript - Window.open location =no 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1542721/

相关文章:

javascript - 移动网站可以进行生物认证吗?

javascript - MongoDB/mongoose - 后保存 Hook 未运行

javascript - 简单数组购物车无法正确显示

javascript - 使用 jquery 水平背景 css 位置

javascript - 获取事件未收到请求 header

javascript - 我需要使用 Promise 还是有更好的方法?

javascript - Vuetify - v-text-field(类型 ="number") - 设置 null 而不是空字符串

javascript - 如果我的第三方软件不允许/读取 <!DOCTYPE> 标签,我如何运行 querySelectorAll?

javascript - 为 AWS S3 的多个对象创建多个签名 url

javascript - 如何在 React Native 项目中导入 JS 库到 TypeScript