The onactivate , onbeforedeactivate , and ondeactivate EventsThe onactivate event occurs in an object when that object becomes the active element in the document (as with the focus or setActive methods ). The onbeforedeactivate event occurs when an object is the active element and is about to be deactivated (as when another object is going to become the active element), and the ondeactivate event occurs when an object is deactivated. You can find the support for these events in Table 6.55. Table 6.55. The onactivate , onbeforedeactivate , and ondeactivate Events
Only elements that can accept the focus can become the active element. Unless you're specifically handling the case when an element becomes the active element and gets the focus (a document can have only one active element, and that element is stored in the activeElement property), it's probably a good idea to stick to the onfocus and onblur events. |