onchange Event

             

Occurs when the user makes a change to a list box, option group, or text box.

Syntax

object_onchange

Parameters

object

A Listbox, OptionGroup, or Textbox script object.

Remarks

For the Listbox object, the event occurs as soon as another item in the list is selected.

For the OptionGroup and Textbox objects, the event occurs when the user modifies an option group or text box and then moves the focus away from the element. For example, if a user selects one of the options in an option group, the event is not fired upon selection. The onchange event is only fired when the user selects something else, like a button, another option, or the page itself.