How do you know that the user has finished the input in the field using pure JS?

Yes, there is a solution with jQuery. But I would like to know how to catch this event in pure JS.
September 19th 19 at 12:57
2 answers
September 19th 19 at 12:59
input.onblur = function() {
 //some magic
}

Similarly, using
element.attachEvent( "on"+eventName, handler)
or
element.addEventListener( eventName, handler, phase)


The first option for the damned IE and one for browsers.

Useful links:
javascript.ru/tutorial/events/comparison#osobennos...
javascript.ru/tutorial/events/crossbrowser
http://learn.javascript.ru/focus-blur#пример-испол...
What other phase? This capture, which, in 99.99% of cases it is necessary to set to false. - Orrin commented on September 19th 19 at 13:02
this event lost focus, not the end of the input. And it only works when you switch the focus to another field. This is absolutely not the same. - erik_Rohan60 commented on September 19th 19 at 13:05
what is meant by the end of the input field? - pauline_Wintheiser commented on September 19th 19 at 13:08
September 19th 19 at 13:01
1. The event of the loss of focus focusOut/blur (jQuery)
2. To put the counter when the focus is on the element and reset it when the event key is pressed keypress (jQuery).
For example, the counter is set to 3 seconds. If the user has not pressed a key on the input field, and believe that he finished typing.
the response from the category "don't read the post, just answer". You said in pure js. - Orrin commented on September 19th 19 at 13:04

Find more questions by tags JavaScript