瀏覽器窗口的尺寸(瀏覽器的視口,不包括工具欄和滾動條)。
(1)、對於Internet Explorer、Chrome、Firefox、Opera 以及 Safari:
window.innerHeight - 瀏覽器窗口的內部高度
window.innerWidth - 瀏覽器窗口的內部寬度
(2)、對於 Internet Explorer 八、七、六、5:
document.documentElement.clientHeight
document.documentElement.clientWidth
或者
document.body.clientHeight
document.body.clientWidth
window.open() - 打開新窗口
window.close() - 關閉當前窗口
window.moveTo() - 移動當前窗口
window.resizeTo() - 調整當前窗口的尺寸
Window.location 對象用於得到當前頁面的地址 (URL),並把瀏覽器重定向到新
Window.location.href || Window.location.reload 刷新當前頁面
location.href 屬性返回當前頁面的 URL。的頁面
location.hostname 返回 web 主機的域名
location.pathname 返回當前頁面的路徑和文件名
location.port 返回 web 主機的端口 (80 或 443)
location.protocol 返回所使用的 web 協議(http:// 或 https://)
location.assign() 方法加載新的文檔
screen.availWidth 屬性返回訪問者屏幕的寬度,以像素計,減去界面特性,好比窗口任務欄。
window.history 對象包含瀏覽器的歷史
history.back() - 與在瀏覽器點擊後退按鈕相同
history.forward() - 與在瀏覽器中點擊按鈕向前相同
window.navigator 對象包含有關訪問者瀏覽器的信息。web