2009年10月 的归档

JS判断是页面中是否出现了滚动条

先做点儿题外话……

最近比较懒,日志基本没有更新呵呵,这篇算是应付吧。

 

判断方法:

当可视区域小于页面的实际高度时,判定为出现滚动条,即:

if (document.documentElement.clientHeight < document.documentElement.offsetHeight) scroll = true;

发表评论 (1)