使用pushstate,指定回退地址

history.pushState(null,"testname", window.location.href);
    window.addEventListener('popstate', function(evt){
        window.location.replace('http://www.baidu.com')
    }, false);

  

posted @ 2018-05-16 15:59  梦醒心晴  Views(398)  Comments(0Edit  收藏  举报