admin管理员组文章数量:1305366
I want to make the URL from a next page non-editable when I open a link like this:
<a href="javascript:window.location=''">Enter Lobby</a>
Is it possible to make the window.location
parameter non-editable through Javascript or PHP?
I want to make the URL from a next page non-editable when I open a link like this:
<a href="javascript:window.location='http://google.co.in?test=raj'">Enter Lobby</a>
Is it possible to make the window.location
parameter non-editable through Javascript or PHP?
- 1 Do you mean: prevent the user to edit the URL in the browser? – Patrick Hofman Commented Jan 28, 2014 at 10:04
1 Answer
Reset to default 7See this w3schools article on window.open
:
window.open("http://yoururl/", "title", "location=no");
The third argument are the specs
. Pass location=no
there.
If you want to disable URL change on the current page, sorry, that is not possible.
本文标签: javascriptPrevent user changing URL in browserStack Overflow
版权声明:本文标题:javascript - Prevent user changing URL in browser - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741805088a2398452.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论