禁用浏览器后退按钮 [英] disable browser back button

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

问题描述

如何禁用浏览器后退按钮适用于所有的主流浏览器:IE / FF / Chrome浏览器/歌剧/ Safari浏览器

how to disable browser back button that works for all major browsers: IE/FF/ Chrome/Opera/Safari.

谢谢!

推荐答案

使用history.forward();在你的源页面从你要去哪里目标page.now如果U尝试回到previous页你无法。

Use history.forward(); in your source page from where you are going to the target page.now if u try to go back to the previous page u can't.

<script type="text/javascript" language="javascript">
  history.forward();
</script>

禁用浏览器按钮是不可能的,但尝试这种解决方案,如果u想以同样的方式来实现。

disabling the browser button is not possible but try this solution if u want to implement in the same way.

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

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