when to use onload in javascript code example Example: javascript onload <body onload="myFunction()">