0
나는 div
에 채팅 상자가 있습니다. 새 메시지가 도착할 때마다 메시지가 상자에 추가됩니다. 상자를 맨 아래로 자동 스크롤하여 새 메시지를 표시하려고합니다. 이것을 어떻게 할 수 있습니까?div 자동 스크롤
<div id="chatting" style="overflow: auto; background-color: #fff; border: solid 2px #dedede; width: 600px; height: 500px; padding: 10px;">
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
hello<br/>
</div>
[데이터를 추가 할 때 div의 끝으로 자동 스크롤하는 방법] (http://stackoverflow.com/questions/7303948/how-to-auto-scroll-to-end-of-div) -when-data-is-added) –
나는이 질문을 이해하고 있는지 확신 할 수 없다. 페이지가로드 될 때 페이지를 맨 아래로 스크롤 하시겠습니까? –