Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Level 10 lesson 9 solution

<!doctype html>
<html>
<head>
<title>JS Window onload event</title>
</head>
<body>
<h1>Welcome to Studytonight!</h1>
<p>We hope you are enjoying the course.</p>
<script>
function showAlert() {
alert("App loaded");
}

// write code here
function showAlert()
{
console.log("Window load complete...");
}
Window.onload=showAlert();

</script>
</body>
</html>
by

1 Answer

kshitijrana14
Try this one:

<!doctype html>
<html>
<head>
<title>JS Window onload event</title>
</head>
<body>
<h1>Welcome to Studytonight!</h1>
<p>We hope you are enjoying the course.</p>
<script>
function showAlert() {
alert("App loaded");
}

// write code here
window.onload=showAlert();

</script>
</body>
</html>

Login / Signup to Answer the Question.