jshtml
var count = 0 ; window.history.pushState(null, null, "#"); window.addEventListener("popstate", function(e) { window.history.pushState(null, null, "#"); document.getElementById('logView').innerHTML = "用戶點擊返回" + (++count) })
htmlspa
<p id="logView">test2</p>