Sometimes when we make dynamically growing divs, we usually append the content to the bottom of the div, but this will bring about a rather painful problem, that is, the newly added content will be hidden at the bottom, like this
How to make the scrollbar automatically move to the bottom? This requires the help of js. Assume that the id of the div is myDiv, then use the native js to implement the following: