【发布时间】:2011-09-11 22:48:05
【问题描述】:
如何确定使用 css overflow:auto 的除法的scrollHeight?
我试过了:
$('test').scrollHeight();
$('test').height(); but that just returns the size of the div not all the content
最终,我正在尝试创建一个聊天,并始终在屏幕上显示当前消息的滚动条。
所以我在想类似以下的事情:
var test = $('test').height();
$('test').scrollTop(test);
谢谢,
布莱恩
【问题讨论】:
-
使用 scrollHeight() 有什么问题?
-
@BadrHari: jQuery 中没有
scrollHeight()函数。 -
它是 $('test').get(0).scrollHeight();
标签: javascript jquery