如何確定一個部門的scrollHeight使用CSS溢出:自動?如何確定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(); – JFouad