<!DOCTYPE html>
<html>
<head>
<script>
function mymessage() {
alert("This message was triggered from the onload event");
}
</script>
</head>
<body onload="mymessage()">
<h1>JavaScript HTML Events</h1>
<h2>The onload Attribute</h2>
</body>
</html>