run javascript when a page is loaded code example Example: js on page loaded window.onload = function() { yourFunction(param1, param2); };