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

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

问题描述

我要禁用网站的后退按钮.

I want to disable the back button for a website.

只要该人单击浏览器的后退"按钮,它就不能进入用户之前访问过的页面.

Whenever the person clicks on the browser back button it should not be able to go on the page the user visited before.

推荐答案

您不能,也不应该.

其他方法/替代方法只会导致用户参与度下降.

Every other approach / alternative will only cause really bad user engagement.

那是我的看法.

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

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