HTML5中history对象解析及前端路由实现封装流程

版权声明:转载请注明出处 https://blog.csdn.net/qdmoment/article/details/83901830

HTML5 history新增了两个API:history.pushStatehistory.replaceState

两个Api都接收三个参数:

语法:

window.history.pushState(state Object, title, URL);

window.history.replaceState(state Object, title, URL);

猜你喜欢

转载自blog.csdn.net/qdmoment/article/details/83901830
今日推荐