Onblur

The blur event fires when an element loses focus.

Onchange

The onChange event gets triggered when the state of an element is changed



Focus imo event

Example

"Edit you probably only want to validate when the value changes and field loses focus that s why imo onchange event would be more appropriate than onblur not onblure"

from question  

HTML 5 input type email check validation on lost focus

"I used the onblur event to destroy the widget and the onchange to save by xhr the new value;the focus is below because the onblur was not working properly"

from question  

Using dijit.InlineEditBox with dijit.form.Select

Better solution answer

Example

"Also onblur is working better than onchange"

from question  

ValueChangeListener not firing for h:inputText when I have a converter as well for the inputText

"Update onchange is more better than onblur and updated my answer accordingly"

from question  

How to auto add a value after user text field input

"That why onchange is a better solution"

from question  

Replace class on clicking outside div

Others

Example

Onchange is a better choice than onblur or focusout because blur and focusout also fire when the contents of the text field hasn t changed

from question  

Automatically save textbox contents

Back to Home
Data comes from Stack Exchange with CC-BY-SA-4.0