在弹出窗口中禁用浏览器的位置栏 [英] Disable Location Bar of Browsers in Pop-up Windows

查看:93
本文介绍了在弹出窗口中禁用浏览器的位置栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

window.open('http://www.msn.com/','New Windows','height = 380,width = 300,location = no')>隐藏地址栏< / a>

它可以正常使用IE浏览器,但不支持FireFox 3及更高版本。



我想在弹出窗口出现时禁用位置栏。

解决方案

问题在你的语法中不是一个错误。问题是安全问题。如果人们可以隐藏地址栏,人们就可以重新创建登录页面,例如Paypal,并且人们将被诱骗登录进去,并给恶意黑客密码。

$ b

因此,大多数最新的浏览器都会禁用隐藏地址栏,尽管在某些浏览器中,设置位置= no会禁用地址栏被修改。


I have the following HTML with Javascript:

<A HREF="javascript:void(0)"onclick="window.open('http://www.msn.com/','New Windows','height=380, width=300,location=no')">Hide Address Bar</a>

It's working fine with IE but not FireFox 3 and later.

I want to disable the "Location" bar when pop-up windows shows up.

解决方案

The problem is not an error in your syntax. The problem is security concerns. If people could hide the address bar, people would be able to recreate login pages such as Paypal and people would be tricked into logging into them and giving a malicious hacker their password.

As a result, most of the latest browsers disable hiding the location bar, although in some browsers, setting location=no will disable the address bar from being modified.

这篇关于在弹出窗口中禁用浏览器的位置栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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