Home > Web Front-end > JS Tutorial > body text

Javascript implements code for DIV scrolling to automatically scroll to the bottom_javascript skills

WBOY
Release: 2016-05-16 17:55:41
Original
1492 people have browsed it

After checking the relevant information, Div does not have the attribute of automatic scrolling. It can only simulate the scrolling of the mouse to achieve the desired effect.

The key part is here: div.scrollTop = div.scrollHeight;

The following is the simplified code for the specific implementation:

Copy the code The code is as follows:





< td>name

gt ; ;td>23 gt ;23 lt ;/td> td> gt; td>memomemomemomemomemo
idagememo
000001 name124memomemomemomemomemo
000002name2< ; /td>23memomemomemomemomemo
23memomemomemomemomemo
memomemomemomemomemo
memomemomemomemomemo
memomemomemomemomemo
memomemomemomemomemo
memomemomemomemomemo







Actually, the implementation is very simple but there is generally little need for this, and some detours were taken during the process.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template