javascript event on document load code example Example: window.onload window.onload = function() { // Some code };