微信返回跳转到指定页面js
$(function(){ pushHistory(); window.addEventListener("popstate",function(e){ location.href='跳转的URL'; }); function pushHistory() { var state = { title: "title", url: "#" }; window.history.pushState(state, "title", "#"); } });
$(function(){ pushHistory(); window.addEventListener("popstate",function(e){ location.href='跳转的URL'; }); function pushHistory() { var state = { title: "title", url: "#" }; window.history.pushState(state, "title", "#"); } });