1 需求
2 语法
- Window 对象
- alert(message)
- prompt(msg,defaultText)
- confirm(message)
- window.open(URL,name,specs,replace)
- window.close()
- setInterval(code,millisec,lang)
- clearInterval(id_of_setinterval)
- setTimeout(code,millisec,lang)
- clearTimeout(id_of_settimeout)
Navigator 对象
- 对象属性
- navigator.platform
- navigator.userAgent
- navigator.appName
- navigator.appVersion
- navigator.appCodeName
- navigator.cookieEnabled
- 对象方法
- navigator.javaEnabled()
- navigator.taintEnabled()
- Screen 对象
- 对象属性
- screen.availHeight
- screen.availWidth
- screen.height
- screen.width
- screen.colorDepth
- screen.pixelDepth
- History 对象
- 对象属性
- history.length
- 对象方法
- history.back()
- history.forward()
- history.go(number|URL)
- Location 对象
- 对象属性
- location.href
- location.protocol
- location.host
- location.hostname
- location.port
- location.pathname
- location.search
- location.hash
- 对象方法
- location.assign(URL)
- location.reload(forceGet)
- location.replace(newURL)
3 示例
JavaScript BOM Demo Window对象 属性和方法 演示
Screen对象 属性和方法 演示
Navigator对象 属性和方法
Location对象 属性和方法 演示
History对象 属性和方法 演示
!DOCTYPE>
4 参考资料