js得到當(dāng)前窗口內(nèi)的相關(guān)尺寸信息
2015/12/6 20:56:141277 閱讀
在javascript中得到當(dāng)前窗口的高和寬
var s = "網(wǎng)頁可見區(qū)域?qū)挘?+ document.body.clientWidth;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.clientHeight;
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetWeight +" (包括邊線的寬)";
s += "\r\n網(wǎng)頁可見區(qū)域高:"+ document.body.offsetHeight +" (包括邊線的寬)";
s += "\r\n網(wǎng)頁正文全文寬:"+ document.body.scrollWidth;
s += "\r\n網(wǎng)頁正文全文高:"+ document.body.scrollHeight;
s += "\r\n網(wǎng)頁被卷去的高:"+ document.body.scrollTop;
s += "\r\n網(wǎng)頁被卷去的左:"+ document.body.scrollLeft;
s += "\r\n網(wǎng)頁正文部分上:"+ window.screenTop;
s += "\r\n網(wǎng)頁正文部分左:"+ window.screenLeft;
s += "\r\n屏幕分辨率的高:"+ window.screen.height;
s += "\r\n屏幕分辨率的寬:"+ window.screen.width;
s += "\r\n屏幕可用工作區(qū)高度:"+ window.screen.availHeight;
s += "\r\n屏幕可用工作區(qū)寬度:"+ window.screen.availWidth;
alert(s);
下一條:微信公眾平臺群發(fā)規(guī)則說明
上一條:微軟雅黑在Windows XP出現(xiàn)鋸齒