P粉4615998452023-08-21 00:34:33
This is much easier if you are using jQuery scrollTop:
$("#mydiv").scrollTop($("#mydiv")[0].scrollHeight);
P粉4133078452023-08-21 00:01:38
This is the code I use on my website:
var objDiv = document.getElementById("your_div"); objDiv.scrollTop = objDiv.scrollHeight;