Attribute value description
Onchange Script: Execute the script when the element changes
Onsubmit Script: Execute the script when the form is submitted
Onreset Script: Execute the script when the form is reset.
Onselect Script: Execute the script when the element is selected
Onblur script executes the script when the element loses focus
Onfocus Script: Execute the script when the element gets the focus
The w3c standards are described in this way.
However, it is found that IE can be executed (however, if you are testing onfocus, do not use alert (), it will pop up infinitely .), Other browsers cannot. IE has always been an disobedient master and is engaged in private ........... however, it is useful to use the above events in non-form elements. You can set the tabindex attribute for non-form elements to allow non-form elements of other browsers to respond to events. This should be regarded as an hack (not compliant with the standard, but it is also helpless ). But it does work.