level 8
document.write(document.body.clientHeight);
完全读不来啊
document.write(document.body.clientWidth);
但是读高的话就毫无压力啊
2012年05月01日 12点05分
1
level 8
不是 document.write(document.body.clientWidth);
读宽没问题,但是换成Height就读不了高
2012年05月01日 12点05分
2
level 11
不是没解析完吧,扔window.onload里面试试
2012年05月01日 13点05分
7
level 8
页面可视高度,不包括滚动部分:
window.innerHeight (低于ie 9不支持)
firefox、chrome 下 html.clientHeight、html.offsetHeight
IE 怪异模式下, html.clientHeight 为0,可用html.offsetHeight(html.clientHeight为0) 或 body.clientHieght
IE 非怪异模式下 html.clientHeight(body.clientHeight 为页面高度)
有 dtd:
IE下 body.clientHeigth 为页面高度, html.clientHeight 为页面可视高度(怪异模式html.clientHeight为0,请用 html.offsetHeight 代替 )
firefox、chrome 下 body.clientHeight 为页面高度, html.clientHeight 为页面可视高度
无 dtd:
IE下 body.clientHeight 仍为页面高度, html.clientHeight 为页面可视高度
firefox、chrome 下 html.clientHeight 为页面高度, body.clientHeight 为页面可视高度
2012年05月03日 14点05分
10
level 8
因此:
window.innerHeight||document.documentElement.offsetHeight||document.body.clientHieght
2012年05月03日 14点05分
11