For select elements, the change event is triggered when an option is selected from the dropdown list. For text fields and text areas, the change event is triggered when the field loses focus.

Syntax

Example

In the jQuery code listed above, the change() method specifies that a function should run when the change event occurs.