mercredi 31 août 2016

How do I programatically force an onchange event on an input?

How do I programatically force an onchange event on an input?

I've tried something like this:

var code = ele.getAttribute('onchange');
eval(code);

But my end goal is to fire any listener functions, and that doesn't seem to work. Neither does just updating the 'value' attribute.

Aucun commentaire:

Enregistrer un commentaire