Alert once Page Load is completed in Asp.Net

My friend asked me to alert user once page load is done. There is a simple way to do so, just write a JavaScript function and call it on “onload” of body tag. “onload” will be triggered after all the images and associated resources are loaded completely, that means after whole page load and that’s what we want to do. See below code, how to do it:

xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<title>Test Page</title>
<script type=”text/javascript”>
function onLoadClicked() {
alert(‘Page load is done.’);
}
</script>
</head>
onLoadClicked()”>
<!– HTML CODE –>
</body>
</html>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s