helenNote
Konck! Knock!
OK
helenNote
Choose mode
dark
auto
light
主页
分类
前端
Engineering
leetCode
SEO优化
axios
后端
浏览器
ajax
css
css module
浏览器个方面的问题
css面试
编辑器
随笔
开发经验
flutter
单元测试
h5
git
github
大文件上传下载
免费试用的接口
零碎面试题
http
react500问
canvas
学习es5
serviceworker
worker
学习es6
各个观察api
es5知识点
js技巧
jsp
生活书籍
学习方法
micro—front—end
小程序
miniProgram
媒体处理
tcp
信息聚合
node
es6
npm调试
前端资源
谷歌performance
页面性能
css性能
js性能
性能优化
js插件
总结
react
react面试
reac18新特性
react源码
styled-components
svg
图床
云盘
typescript
vite
vue2
vue2学习
vue2源码
vue3
vue3源码
webpack面试
webpack
websocket
EfficientPerformance
算法
标签
其它
怎么使用vuepress
使用vuepress写页面
怎么写vuepress插件
怎么使用git
目前使用小乌龟git的经验
自动化部署
利用github完成自动化部署
Projects🎈
My Project
Common sites🎈
友 链
Java SE API Documentation
(opens new window)
Program Creek
(opens new window)
Spring
(opens new window)
Stackoverflow
(opens new window)
LeetCode
(opens new window)
Vue.js
(opens new window)
BootCDN
(opens new window)
Linux命令大全
(opens new window)
编程语言排行榜
(opens new window)
时间线
关于我
GitHub
(opens new window)
学习es5
Konck! Knock!
OK
学习es5
wǎng luò shí huāng
2021-12-29
history location
history和location对象的区别
#
history对象:
所有的属性和方法:
参考mdn
属性理解补充:
返回当前session中的history总个数。和页面在session里的位置无关。
方法理解的补充:history.pushState()、history.replaceState()不会刷新当前页面,只会修改地址栏和session里地址的栈结构。history.pushState()会增加session里的页面个数;history.replaceState()会替换session里栈顶的页面记录。
具体的使用以及数据的传递、获取,
参考mdn
#
history相关的事件:
popstate:不是所有的history方法都会触发这个事件,
参考mdn
#
location对象:
如果说history是操作浏览器地址栈的,那么location就是操作地址以及加载新页面的。
参考mdn
最近更新
01
Git 和 Husky 添加提交钩子并实现代码任务自动化
01-30
02
其他工程化杂项
08-29
03
其他工程化杂项
04-10
更多文章 >
展开
···
歌手: