onblur, onfocus attribute

Type:action
Inherited:no
Used By:input

The onfocus attribute can be set on input type="text" attribute to run an action when the form field gains focus, and the onblur attribute to run an action when that focus is lost. They can be set for any form element except for digital signatures.