onload js defining a function js code example Example: javascript onload <body onload="myFunction()">