html5之history对象理解
history对象之pushState,replaceState
浏览器有一个history对象,用来保存浏览历史,用户可以通过点击浏览器的后退或前进按钮在历史记录中切换。之前对history的操作的API主要是前进、后退、跳转等,而在HTML5中提供了2个新方法来管理history。
history.pushState(state, title, url);
history.replace...
原创
2018-05-15 09:50:27 ·
2420 阅读 ·
0 评论