JavaScript Jump-To-Bottom On Page Load (Public Domain)
March 2017



Here’s some free (public domain) code I wrote in JavaScript, that jumps to the bottom of the page when the page has fully loaded. The “setTimeout” wrapper is needed, because we don’t want it to try to jump to the bottom before the page content is all there! To use this, just put it somewhere in your HTML.


<script language="JavaScript">

setTimeout(
function() {
  window.scrollTo(0,document.body.scrollHeight); }
, 0);

</script>


Back to Tutorials.