简体   繁体   中英

Disable Location Bar of Browsers in Pop-up Windows

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.

Modern browsers do not allow you to hide the address bar (as an anti-phishing measure). There should be no way around this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM