location对象
location. assign() //跟href一样,可以跳转页面 记录历史,可以后退页面
location. replace() //替换当前页面 不能后面页面
location.reload() //重新加载页面 相当于刷新
参数为空就是刷新 参数为true 强制刷新 ctrl+F5
nvaigator对象
userAgent 查看用户使用的浏览器 设备
history对象
history.forward() 前进功能
history.back() 后退功能
history.go() 参数为前进几步 正负都可以
本文详细介绍了网页浏览器中location对象的使用,包括location.assign(), location.replace(), 和 location.reload() 方法的功能与区别。同时,深入探讨了navigator对象的userAgent属性,以及history对象的forward(), back(), 和 go() 方法,帮助读者掌握网页导航和历史记录管理的核心技术。

被折叠的 条评论
为什么被折叠?



