BOM :瀏覽器對象模型
可以通過全局對象window來訪問
window.document // 當前頁面的文檔(源碼)
window.frames // 框架集合
window.navigator // 瀏覽器及其功能信息
window.screen // 屏幕信息
window.location
window.history // 歷史信息
window.close() // 關閉頁面
window.open('url',"blank","style") //打開一個新頁面,是否在新窗口打開,blank爲true,則是在新窗口打開,style爲樣式
window.location
window.location.href = ''// 跳轉頁面
window.location.reload() // 刷新頁面
window.location.reload(true)// 帶緩存刷新
window.location.replace() // 跳轉頁面不留痕跡
window.location.assign() // 跳轉頁面留痕跡
window.history
window.history.back() // 跳轉到前一頁
window.history.forward() // 跳轉到後一頁
window.history.back() // 上一頁
window.history.go() // 大於0時,跳轉到自己後面的頁面。小於0時,跳轉到前面的頁面