Re: Why we use Events in JavaScript?
I think that looking at some example will make you more easy to understand. I have explained you the Resize event. With the help of this event we can detect whenever the window is being resized by the user. Following script demonstrates the Resize event :
Code:
<html>
<head>
<script language="JavaScript">
window.onresize= message;
function message() {
alert("This window has been resized!");
}
</script>
</head>
<body>
So resize the window.
</body>
</html>
I do to dead flowers what people at morgues do to dead people. Suck all the moisture out, dip them in plastic, paint them up pretty and put them in a nice frame.
Bookmarks