In our last tutorial we left off with the mouse events. We’ll be wrapping up the series on JavaScript events in this part. It’s been a long ride, but by the end of this article you should be able to create some nifty dynamic web pages. When Google buys your nerd-infested web site, don’t forget the guy who got you there.
OnReset, OnResize and Other JavaScript Events - OnResize (Page 2 of 5 )
When I resize, several things happen: the bed breaks, my clothes stretch, and chairs tend to moan when I sit in them. When windows or frames are resized in JavaScript, several very different things happen as well.
<html>
<body onresize="alert('Quit changing my window size you bafoon!')">
<p><h1>I <i>dare</i> you to resize this here window.</h1></p>
</body>
</html>
In this example, when the user tries to resize the window, a pop-up alert appears chastising them: Quit changing my window size you bafoon!