首页
博客
源码
资源
博客
源码
写文章
发布博客
发布资源
登录
X
history
相关资讯
热门
最新
01-01 08:00
history和hash 模式(history和hash模式的区别)
history和hash 模式(history和hash模式的区别),今天在学习从0到1搭建项目的时候,看到了router中的路由模式,努力回想了下之前学过的知识点,发现自己对这方面知识还是有所匮乏,所以重新再整理学习下vue3.0import{createRouter,createWebHistory}from'vue-router'//createWebHashHistoryimportHom
325
代码人生
01-01 08:00
代码人生
history 与 hashchange 原生 api
history 与 hashchange 原生 api 非刷新页面跳转(history跳转或者location.hash 跳转) window.onpopstate = console.log window.onhashchange = console.log 1. history.pushState({a:1,b:2}, ‘title‘, ‘/test‘) // /test 2. history.pus
97