Update a textfield after it has lost focus?
I would like to change the value of a textfield once a user finishes entering information and the field loses focus. How do I do this?
I can only find events for when a field gains focus, not loses.
txtField.addEventListener('focus',function(e)
2 Answers
-
Accepted Answer
Hi Pete
The event you are looking for is 'blur'.
It's not particularly intuitive, is it? However, the term is fairly ubiquitous across js and web development.Hope this helps :)
-
Oops, please disregard. I misread the question and I can't delete my post so I will just delete the contents…