My code is:-
<html>
<head>
<script>
function welcome()
{
alert("Successfully loaded");
}
function bye()
{
alert("Unload");
}
</script>
</head>
<body onload="welcome()" onunload="bye()">
</body>
when i execute this only the function for "onload()" is called. Can you tell me how to trigger "onunload()" event also...
alertfromonunload. Tryonbeforeunload.unloadandbeforeunloadat MDN