Settings | Sign in | Sign up

The author has 1 post.

【資料】Javascript獲得可滾動div或iframe的屬性

Floor 1 产品的注销 12/15/10 18:52

s += "網頁可見區域寬:"+ document.body.clientWidth;
s += "網頁可見區域高:"+ document.body.clientHeight;
s += "網頁可見區域高:"+ document.body.offsetWeight +" (包括邊線的寬)";
s += "網頁可見區域高:"+ document.body.offsetHeight +" (包括邊線的寬)";
s += "網頁正文全文寬:"+ document.body.scrollWidth;
s += "網頁正文全文高:"+ document.body.scrollHeight;
s += "網頁被捲去的高:"+ document.body.scrollTop;
s += "網頁被捲去的左:"+ document.body.scrollLeft;

Content converter:

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.