Code
Execute
<!DOCTYPE html> <html> <head> <title>Wikitechy HTML onload attribute</title> <script> function onLoad() { alert("Wikitechy Page is loaded") } </script> </head> <body onload="onLoad()"> <h2>Welcome to Wikitechy!</h2> </body> </html>
Result