BOM对象有 screen location navigator history
1.screen有width height availHeight availWidth
2.location
console.log(window.location);
//window.location.href="http://www.baidu.com" // 可以切换网址
//window.location.host 设置或返回主机号和当前URL的端口号
//window.location.port 设置或返回当前URL的端口号
//window.location.hash 设置或返回从#号开始的url(锚点)
3.navigator
console.log(window.navigator);//浏览器信息
//appName 产品名称 appVersion版本信息
//platform 运行浏览器的操作系统平台
4.history
console.log(window.history.length);
//window.history.go();go里面可以写数,整数前进,负数回退
//window.history.back();返回
//window.history.forward();前进
//回退前进是获取的当前浏览器窗口的历史记录