如何在浏览器中禁用后退按钮? [英] How to disable the back button in browser?

查看:108
本文介绍了如何在浏览器中禁用后退按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我接受任何其他解决方案:

我有五页用于注册用户。但我不希望用户能够使用浏览器后退按钮返回。例如:填写Page1并转到Page2然后转到Page3。如果用户点击后退按钮,我想将他重定向到Page1。

I accept any other solution for this:
I have five pages for registrering users. But I don''t want users to be able to go back using browser back button. For example: Fill Page1 and go to Page2 then Page3. If user clicks back button I want to redirect him to Page1.

推荐答案


我接受任何其他解决方案:

我有五页用于注册用户。但我不希望用户能够使用浏览器后退按钮返回。例如:填写Page1并转到Page2然后转到Page3。如果用户单击后退按钮我想将他重定向到Page1。
I accept any other solution for this:
I have five pages for registrering users. But I don''t want users to be able to go back using browser back button. For example: Fill Page1 and go to Page2 then Page3. If user clicks back button I want to redirect him to Page1.



这可以通过使用javascript来实现

this is possible by using javascript

展开 | < span class =codeLinkonclick =selectAll(this);>选择 | Wrap | 行号



我接受任何其他解决方案:

我有五页用于注册用户。但我不希望用户能够使用浏览器后退按钮返回。例如:填写Page1并转到Page2然后转到Page3。如果用户单击后退按钮我想将他重定向到Page1。
I accept any other solution for this:
I have five pages for registrering users. But I don''t want users to be able to go back using browser back button. For example: Fill Page1 and go to Page2 then Page3. If user clicks back button I want to redirect him to Page1.



一种方法是将httpCachebility设置为false

,这样客户端就不会存储任何网络历史记录,以及后退或前进按钮不会工作。

在网页中放置你自己的后退按钮,将用户重定向到任何地方重定向


希望这有帮助

One way is to set the httpCachebility to false
so the client will not store any web history, and the back or the forward buttons wil not work.
PLace your own back buttons in the web page to redirect the user wherever they are to be redirected

Hope this helps


这仅适用于IE。 Firefox,Opera,Safari和Netscape的解决方案是什么?

我在PageLoad方法中试过这个:

This works only for IE. Any solution for Firefox, Opera, Safari and Netscape?
I tried this in PageLoad method:

展开 | 选择 | 换行 | 行号


这篇关于如何在浏览器中禁用后退按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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