多國語言翻譯:

展開 | 闔起

人氣:6923
b168168tw - javaScript | 2012-11-24 | 人氣:6923

//取得html結構中body的總寬度

document.body.clientWidth;

//取得html結構中body的總高度

document.body.clientHeight;

 

範例:

<body>

內容

</body>

 

var $bodywidth=document.body.clientWidth; 

var $bodyHeight=document.body.clientHeight;

變數$bodywidth可取得body的寬度

變數$bodyHeight可取得body的高度

 

neilthemesSimple網站設計開發:Neil網站設計工坊,徐嘉裕Neilhsu
Website CMS by:XOOPS 網站設計:Neil網站設計工坊
營業人名稱:尼爾網站設計工坊 統一編號:37586308
服務專線:0931229118網路電話:07010003568
Do NOT follow this link or you will be banned from the site!