HTML onblur Event Attribute
Example
Validate when the user leaves the input field:
Try it »
Browser support





All major browsers support the onblur event attribute
Definition and Usage
onblur is triggered when an element loses focus.
Onblur is often used for code validation (when the user leaves a form input field).
Tip: The opposite attribute of the onblur attributeonfocus attribute.
Differences between HTML 4.01 and HTML5
none.
Syntax
<
element
onblur="
script
">
HTML Event Attributes