Net-informations.com
SiteMap  | About    

Form Events



Events are things that happen to objects, such as the clicking of a command button or the opening and closing of a form, etc. These events trigger an action to be carried out. The HTMLFormElement interface represents a form element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements. The form events are the same standard JavaScript events , but with added support by jQuery . A form event is fired when a form control receive or loses focus or when the user modify a form control value such as by typing text in a text input, select any option in a select box etc.

  1. submit
  2. select
  3. change
  4. focus
  5. blur

blur() event

The blur event is triggered when the element loses focus. This event is commonly used with input elements, but can be used with other HTML elements . An element can lose focus when the mouse is clicked outside of the element or through keyboard commands, such as, tabbing out of an input element.

run this source code Try it Yourself

Full Source

submit() event

The submit event is one of the more popular form elements (right behind the change event). The method submit() attaches an event handler that executes a function when the submit event occurs or triggers the event. This event occurs whenever a form is submitted .

run this source code Try it Yourself

Full Source

select() event

The jQuery method of select() corresponds to select event, it is triggered when the user selects the element value.

run this source code Try it Yourself

Full Source

change() Method

The change() Method fire when an element value is changed.

run this source code Try it Yourself

Full Source

focus()

The focus() method can either trigger the focus event or attach a function to run when the focus event is triggered.

run this source code Try it Yourself
Enter:

Full Source









net-informations.com (C) 2018    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.