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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -