javascript - how to show the bottom of div with scroll? -


this question has answer here:

i have div scroll have information mysql.

this div supose chat (like facebook chat) , refresh ajax every seconds.

i need div alwase show me information in bottom (like facebook chat)

how made (keep scroll down)?

<div style='width:100%; height:275px; bottom:25px; overflow-y:scroll;' id='aaa'>   chat  </div> 

try following

var objdiv = document.getelementbyid("your_div"); objdiv.scrolltop = objdiv.scrollheight; 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -