call function on page load javascript code example Example: javascript onload <body onload="myFunction()">