window.addEventListener(‘popstate‘, function(e) {
if(document.URL.split(‘/‘)[document.URL.split(‘/‘).length - 1] == ‘home‘) {
history.pushState(null, null, document.URL); //让当前url (home)作为最开始的 第一层(栈底)
}
});
参考理解原理 http://www.cnblogs.com/accordion/p/5699372.html