javascript獲取屏幕和窗口尺寸
來源:易賢網(wǎng) 閱讀:1293 次 日期:2016-06-29 09:19:48
溫馨提示:易賢網(wǎng)小編為您整理了“javascript獲取屏幕和窗口尺寸”,方便廣大網(wǎng)友查閱!

<script language=text/javascript>

var tempstr =網(wǎng)頁可見區(qū)域寬:+ document.body.clientwidth;

tempstr += \r\n網(wǎng)頁可見區(qū)域高:+ document.body.clientheight;

tempstr += \r\n網(wǎng)頁正文全文寬:+ document.body.scrollwidth;

tempstr += \r\n網(wǎng)頁正文全文高:+ document.body.scrollheight;

tempstr += \r\n網(wǎng)頁正文部分上:+ window.screentop;

tempstr += \r\n網(wǎng)頁正文部分左:+ window.screenleft;

tempstr += \r\n屏幕分辨率的高:+ window.screen.height;

tempstr += \r\n屏幕分辨率的寬:+ window.screen.width;

tempstr += \r\n屏幕可用工作區(qū)高度:+ window.screen.availheight;

tempstr += \r\n屏幕可用工作區(qū)寬度:+ window.screen.availwidth;

alert(tempstr);

</script>

更多信息請查看腳本欄目
易賢網(wǎng)手機網(wǎng)站地址:javascript獲取屏幕和窗口尺寸
關于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點

版權所有:易賢網(wǎng)