javascript - How do I programmatically force an onchange event on an input? -
how programmatically force onchange event on input?
i've tried this:
var code = ele.getattribute('onchange'); eval(code);
but end goal fire listener functions, , doesn't seem work. neither updating 'value' attribute.
ugh don't use eval anything. well, there things, they're extremely rare. rather, this:
document.getelementbyid("test").onchange()
look here more options: http://jehiah.cz/archive/firing-javascript-events-properly
Comments
Post a Comment