2010-04-16 28 views
7

Bir ileti kutum var ve kaydırma penceresini IM pencereleriyle aynı tutmak istiyorum.Kaydırmanın altta tutulması

Benim html Benim css html ve css yoluyla mümkün değilse

#shoutContainer { 
    height: 100px; overflow-y: scroll; 
} 

<div id="shoutContainer"> 
      <table id="shoutbox"> 
       <tbody> 
         <!-- shouts here --> 
       </tbody> 
      </table> 
    </div> 

olduğunu. Bunu ham javascript’te yapabilir miyiz?

cevap

14

, aşağıdakileri yapın:

document.getElementById('shoutContainer').scrollTop = 10000; 
// or some other big number 

düzenlenmiş biz çerçevesi olmadan alabilir

0

hiçbir çerçeve kullanmadığım için, bunu yalnızca CSS ile yapabileceğinizden emin değilim, ancak işte harika bir jQuery çözümü: Ajaxdaddy shoutbox.

Free shoutboxes:

İşte mutlu müşteri tutmak için ücretsiz bir bağırmak kutusu hizmetidir.

Tamam, example here.

bir öğe her eklendiğinde
+0

? Bir çerçeve kullanmam mümkün değil. – Shishant