Document javascript function loads when

Closures and executing JavaScript on page load — SitePoint

javascript function when document loads

JavaScript Refresh Page Quackit Tutorials. Defer loading javascript.