我如何确定scrollHeight?
如何确定一个部门的scrollHeight使用CSS溢出:自动?
我试过了:
$('test').scrollHeight(); $('test').height(); but that just returns the size of the div not all the content 最终,我试图创build一个聊天,并始终让滚动条到屏幕上的当前消息。
所以我在想如下的东西:
 var test = $('test').height(); $('test').scrollTop(test); 
谢谢,
布赖恩
  scrollHeight是一个常规的JavaScript属性,所以你不需要jQuery。 
 var test = document.getElementById("foo").scrollHeight; 
在jQuery中正确的方法是 –
-   $('#test').prop('scrollHeight')或者
-  $('#test')[0].scrollHeight
希望能帮助到你。