javascript input onchange not working

FernandoSBS picture FernandoSBS · May 22, 2010 · Viewed 27.3k times · Source

why this doesn´t work:

inputButton.addEventListener('onchange', jsFunction, false);

I change the inputbox and it doesn´t call jsFunction.

Answer

Soufiane Hassou picture Soufiane Hassou · May 22, 2010

Try change instead of onchange

inputButton.addEventListener('change', jsFunction, false);