BOM:浏览器对象模型 --- B/S、Object、Model
-
window
-
navigator
-
screen
-
location
-
document
-
history
window:操作浏览器窗口
//我们可以通过一些指令控制浏览器
window.alert();//弹窗
window.innerwidth;//获取浏览器页面宽度
···
navigator:封装了浏览器的信息(不推荐使用)
navigator.appName;//浏览器名字
navigator.appVersion;//浏览器版本
···
screen:内含屏幕尺寸
screen width;
screen height;
location:当前页面URL信息
host:"www.baidu.com"
protocol:"http"
···
document:当前页面信息
document.title
···
history:浏览器的历史纪录
history.back();//返回上一个页面
history.forward();//进入刚刚打开的页面