- onchange
Fires after the contents of an text object or selection has changed. This does not fire "while" you are changing text or selecting.
Can be applied to the following tags:
INPUT type=file, INPUT type=text, SELECT, TEXTAREA
e.g., for a select
For textboxes and textareas you have to change the value and leave the textbox (i.e., blur) before the test is made about whether you changed the value or not. You can erase the content, retype it exactly as it was and the event will NOT fire (because it didn't change).
e.g., change this textbox  
- onsubmit
Fires before a form is submitted.
Can be applied to the following tag:
FORM
This page's form tag is:
<form name="tform" action="http://auckland.bauer.uh.edu/students/parks/echo.asp" method="POST" onsubmit="javascript:alert('I am ready to submit the form data to the server');">
- onreset
Fires before a form is reset.
Can be applied to the following tag:
FORM
This page's form tag is:
<form name="tform" action="http://auckland.bauer.uh.edu/students/parks/echo.asp" method="POST" ... onreset="javascript:alert('I am ready to reset the form data on this page');">
Here is a reset button (input type="reset" ) and a textbox with a value supplied. Add some text to the textbox, click the reset button, click "OK" and watch the textbox.
- onselect
You would think this applies to select boxes -- it does NOT. It applies to selecting text when you click into a textbox, or textarea or text on the page, then drag across the text to select it (like you were going to cut and paste). The event fires when you release the mouse.
Can be applied to the following tag:
BODY, INPUT type=text, TEXTAREA
The textbox below has the following construction:
<textarea onselect="javascript:alert('You have now selected some text');" name="ta1" rows="3" cols="30">Now is the time for all good men to come to the aid of their party</textarea>
In the textarea below, select some text with the mouse and release the mouse button.
CAUTION: this behavior in the IE browser (version 7) causes the event to fire at the beginning of the selection process. In the mozilla browsers, this event fires when the selection has been completed.
- onfocus
This events fires when an HTML object receives focus (i.e., typically when the user click in the tag)
Can be applied to the following tag or object:
A, ABBR, ACRONYM, ADDRESS, APPLET, AREA, B, BDO, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, CUSTOM, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, window, XMP, Element Constructor, Window Constructor
The textbox below has the following construction:
<input type="text" size="4" maxlength="4" name="t1" onfocus="javascript:alert('this textbox now has the focus');">
In renders as shown below. Click in the textbox:
- onblur
This events fires when an HTML object looses focus (i.e., typically when the user click in another tag)
Can be applied to the following tag or object:
A, ABBR, ACRONYM, ADDRESS, APPLET, AREA, B, BDO, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, CUSTOM, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, window, XMP
The textbox below has the following construction:
<input type="text" size="4" maxlength="4" name="t1" onblur="javascript:alert('this textbox now has lost focus');">
It renders as shown below. Click in the textbox, then click the button: