在函數內的變量,只能在函數內被訪問? 局部變量
全局變量
如何讓函數內的變量成為全局變量的
window.open();
window.close();
window.scrollBy(x,y); 單位默認是px,滾動條往下走500px,每次點擊都會走
window.scrollTo(x,y); 單位默認是px,滾動條往下走到500px的位置。
window.innerWidth? window.innerHeigth? 指的瀏覽器可用尺寸 寬和高
var clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var clientHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
screen.
availWidth availHeight 屏幕的可用寬度和高度
width height? ? ? ? ? 屏幕高度和寬度
history.back()? ? 加載 history 列表中的前一個 URL。
history.forward()? 加載 history 列表中的下一個 URL。
history.go()? ? ? 加載 history 列表中的某個具體頁面。