I have an aspx that has the following javascript function being ran during the onload event of the body.
window.addEventListener("load", function() { startClock(); }
This will invoke the startClock function at page load.