Query the relevant information, Div does not automatically scroll properties, can only simulate the scrolling mouse to the actual desired effect.
The crucial part is here: Div.scrolltop = div.scrollheight;
The following is a detailed implementation of the streamlined code:
Copy Code code as follows:
<body>
<div id= "Divdetail" style= "overflow-y:scroll; width:250px;height:200px; " >
<table style= "border:1px solid; ">
<tr><td>id</td><td>name</td><td>age</td><td>memo</td> </tr>
<tr><td>000001</td><td>name1</td><td>24</td><td> Memomemomemomemomemo</td></tr>
<tr><td>000002</td><td>name2</td><td>23</td><td> Memomemomemomemomemo</td></tr>
<tr><td>000003</td><td>name3</td><td>23</td><td> Memomemomemomemomemo</td></tr>
<tr><td>000004</td><td>name4</td><td>23</td><td> Memomemomemomemomemo</td></tr>
<tr><td>000005</td><td>name5</td><td>23</td><td> Memomemomemomemomemo</td></tr>
<tr><td>000002</td><td>name2</td><td>23</td><td> Memomemomemomemomemo</td></tr>
<tr><td>000003</td><td>name3</td><td>23</td><td> Memomemomemomemomemo</td></tr>
<tr><td>000004</td><td>name4</td><td>23</td><td> Memomemomemomemomemo</td></tr>
<tr><td>000005</td><td>name5</td><td>23</td><td> Memomemomemomemomemo</td></tr>
</table>
</div>
</body>
<script type= "Text/javascript" defer>
var div = document.getElementById (' Divdetail ');
Div.scrolltop = Div.scrollheight;
alert (div.scrolltop);
</script>
In fact, the implementation is very simple but generally rarely have this demand, during the period or some detours.