onblur Attributeonblur AttributeThe onblur attribute specifies script to be executed
when the element loses focus, for example when tabbed away from.
See also the onfocus attribute.
If you use this attribute (or any attributes of Type Script) the MIME type of the scripting language used should always be provided in a Content-Script-Type HTTP header.
It is good practice not to use these attributes, however,
and instead to include external scripts (via
script elements)
which add any handlers unobtrusively. This makes code more self-contained and
also the XHTML is easier to maintain if it doesn't contain any events attributes.
Note: In many browsers,
label elements cannot be tabbed to and never
receive focus (any focus is merely passed on to the relevant form control). If they never receive focus then they
can never lose it which means that the script in the onblur attribute is never executed in these browsers.