let state = { title: "title", url: "#" }; window.history.pushState(state, "title", "#"); window.addEventListener("popstate", function(e) { var ret = confirm('确定退出?'); if(ret){ history.go(-1) }else{ return false; } }, false);
部分素材资源来源网站,本站提供免费下载,如有侵权请联系站长马上删除!