V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
bhy5899s
V2EX  ›  V2EX

如何让网站页面跳转后不能返回上一个页面?

  •  
  •   bhy5899s · 2018-07-30 10:52:31 +08:00 · 4162 次点击
    这是一个创建于 2069 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我是用这个命令跳转的<meta http-equiv="refresh" content="0.1; url=">,但是跳转后还能点击返回上一个页面,怎么让它跳转后不能返回上一页。
    2 条回复    2018-07-30 11:08:05 +08:00
    o0
        1
    o0  
       2018-07-30 11:06:55 +08:00
    location.replace
    a570295535
        2
    a570295535  
       2018-07-30 11:08:05 +08:00
    在 js 里面加上这一句:
    $(document).ready(function(){window.history.forward(1);});
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2748 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 12:35 · PVG 20:35 · LAX 05:35 · JFK 08:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.