Write a JavaScript program call a function after loading a webpage using onload() event.
<html>
<head>
<title>Onload Demo</title>
<script>
function sayHello()
{
alert("Hii");
}
</script>
</head>
<body onload="sayHello()">
<p>This is an example of onload function.</p>
</body>
</html>
