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!

Supporting HTML tags: <a>, <address>, <b>, <big>, <blockquote>, <body>, <button>, <cite>, <code>, <dd>, <dfn>, <div>, <dl>, <dt>, <em>, <fieldset>, <form>, <frame>, <h1> to <h6>, <hr>, <i>, <img>, <input>, <kbd>, <label>, <legend>, <li>, <object>, <ol>, <p>, <pre>, <samp>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <table>, <textarea>, <tt>, <ul>, <var>
Supporting Javascript Objects: window
Next: OnSelect >>
More JavaScript Articles
More By James Payne