前端路由

路由是什么

https://zh.wikipedia.org/wiki/%E8%B7%AF%E7%94%B1

前端路由的实现有两种方法

  1.监听hashchange

  2.监听popstatus

https://juejin.im/post/5ac61da66fb9a028c71eae1b

https://www.zhihu.com/question/53064386

第一种

https://www.runoob.com/jsref/obj-location.html 

 

 

第二种

https://juejin.im/post/5a7332b25188257a6d634f8d

https://developer.mozilla.org/zh-CN/docs/Web/API/Window/popstate_event

posted @ 2019-07-31 22:47  路过的甲同学  阅读(139)  评论(0)    收藏  举报