Like mouse enter/leave, these are almost always what you want, not the onFocus and onBlur events we currently expose. I run into this semi-frequently when actually doing product work. We should add them.
In JavaScript: object.onfocusout=function(){myScript}; Try it Yourself » In JavaScript, using the addEventListener() method: object.addEventListener("focusout",myScript); Try it Yourself » Technical Details Bubbles:Yes Cancelable:No Event type:FocusEvent ...