获取宽高
var width = window.innerWidth
|| document.documentElement.clientWidth
|| document.body.clientWidth
var height = window.innerHeight
|| document.documentElement.clientHeight
|| document.body.clientHeight
screen.availWidth
screen.availHeight
获取信息
location.hostname
location.pathname
location.port
location.protocol
location.href
加载新文档
location.assign("http://www.baidu.com")
window.open("https://www.baidu.com");
后退与前进
history.back()
history.forward()
其他操作
window.close()
window.moveTo()
window.resizeTo()