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

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -