Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Forms

 Forms

A few examples on val, blur, focus, change and submit.

John Nunemaker PRO

November 17, 2010

Transcript

7 slides
  1. .val() Gets the input of the first matched element http://docs.jquery.com/Attributes/val

    http://teaching.johnnunemaker.com/capp-30550/examples/val-method/
  2. .focus() Bind a function to the focus event of each

    matched element. The focus event is fired when an element receives focus from the mouse or by pressing tab. http://docs.jquery.com/Events/focus#fn http://teaching.johnnunemaker.com/capp-30550/examples/focus-a-field/ http://teaching.johnnunemaker.com/capp-30550/examples/focus-event/
  3. .blur() Bind a function to the blur event of each

    matched element. The blur event fires when an element loses focus either via the mouse or by pressing tab. http://docs.jquery.com/Events/blur#fn http://teaching.johnnunemaker.com/capp-30550/examples/blur-event/ http://teaching.johnnunemaker.com/capp-30550/examples/blur-validation/
  4. .change() Binds a function to the change event of each

    matched element. The change event fires when a control loses the input focus and its value has been modified since gaining focus. http://docs.jquery.com/Events/change#fn http://teaching.johnnunemaker.com/capp-30550/examples/change-event/
  5. .submit() Bind an event to the submit event of each

    matched element. http://docs.jquery.com/Events/submit#fn http://teaching.johnnunemaker.com/capp-30550/examples/submit-event/

More Decks by John Nunemaker

Other Decks in Programming