I want to call an onblur on div. Not sure how to get it done.
onblur
div
Tried this:
div onblur="javascript:callme()"
but it didn't work
For blur event to fire on an element, the element needs to receive focus first. But <div> elements do not receive focus by default.
blur
<div>
You can add tabindex="0" or contentEditable to your div so it will receive focus.
tabindex="0"
contentEditable
See it in action: http://jsfiddle.net/t25rm/
1.4m articles
1.4m replys
5 comments
57.0k users