/ input

Quickie: JS - input change

Many developers try to handle change of input value with change or keyup/keydown event listeners. Well, that's not enough.

You can change the value also by:

  • dropping selected text,
  • copying it to clipboard and right clicking mouse -> Paste.

The correct way to handle it is with input event listnener. You can read about it on MDN. And you might find interesting this StackOverflow post.

Tags:
#input #js #keyup #keydown #change #event-listener #quickie

TvK

IT and languages. Feel free to be a grammar-nazi and correct my English (or any other language).

Read More