只要后退或者前进就会触发.
window.addEventListener("popstate", function () {
console.log(history.state);
})
详细见http://www.tuicool.com/articles/MvYnY3U
只要后退或者前进就会触发.
window.addEventListener("popstate", function () {
console.log(history.state);
})
详细见http://www.tuicool.com/articles/MvYnY3U
本文标题:监听浏览器的前进/返回事件popstate
本文链接:https://www.haomeiwen.com/subject/mtsmqxtx.html
网友评论