how to give a function on window load in javascript code example Example: javascript onload <body onload="myFunction()">