JS 獲取瀏覽器

function getInfo() 
{ 
var s = ""; 
s = " 網頁可見區域寬:" document.body.clientWidth; 
s = " 網頁可見區域高:" document.body.clientHeight; 
s = " 網頁可見區域寬:" document.body.offsetWidth " (包括邊線和滾動條的寬)"; 
s = " 網頁可見區域高:" document.body.offsetHeight " (包括邊線的寬)"; 
s = " 網頁正文全文寬:" document.body.scrollWidth; 
s = " 網頁正文全文高:" document.body.scrollHeight; 
s = " 網頁被捲去的高(ff):" document.body.scrollTop; 
s = " 網頁被捲去的高(ie):" document.documentElement.scrollTop; 
s = " 網頁被捲去的左:" document.body.scrollLeft; 
s = " 網頁正文部分上:" window.screenTop; 
s = " 網頁正文部分左:" window.screenLeft; 
s = " 屏幕分辨率的高:" window.screen.height; 
s = " 屏幕分辨率的寬:" window.screen.width; 
s = " 屏幕可用工做區高度:" window.screen.availHeight; 
s = " 屏幕可用工做區寬度:" window.screen.availWidth;
 
s = " 你的屏幕設置是 " window.screen.colorDepth " 位彩色"; 
s = " 你的屏幕設置 " window.screen.deviceXDPI " 像素/英寸"; 
//alert (s); 
} 
getInfo();
相關文章
相關標籤/搜索