js
var count = 0 ; window.history.pushState(null, null, "#"); window.addEventListener("popstate", function(e) { window.history.pushState(null, null, "#"); document.getElementById('logView').innerHTML = "用户点击返回" + (++count) })
html
<p id="logView">test2</p>