BOM

81 阅读1分钟

BOM:Browser Object Model(浏览器对象模型) 提供了独立于内容与浏览器窗口进行交互的对象

console.log(window.location.search);//地址的参数信息
console.log(window.location.href);//地址路径
console.log(window.location.port);//地址的端口
//后退
window.history.back();
window.history.go(-1);
//前进
window.history.forward();
window.history.go(1)
//刷新
window.history.go();
window.history.go(0);
location.reload();