17、常用的 BOM
locationlocation.assgin(url)跳转页面,创建新的浏览器历史,等价于location.href = urllocation.replace(url)跳转页面, 替换当前的浏览器历史location.reload()刷新当前页面
historyhistory.pushState(state, title, url)跳转页面,创建新的浏览器历史,但不刷新页面history.replaceState(state, title, url)跳转页面,替换当前的浏览器历史,但不刷新页面history.back()后退一步history.forward()前进一步history.go(number)跳到 n 步
navigatornavigator.useAgent获取当前浏览器的信息navigator.useAgentData获取当前浏览器的信息,更详细
screenscreen.width/height浏览器所属设备的宽高screen.availWidth/availHeight浏览器所属设备的可用高度(减掉系统的上下任务栏宽高)
17、常用的 BOM
https://mrhzq.github.io/职业上一二事/前端面试/每日知识卡片/17、常用的 BOM/