[ACCEPTED]-setting oninput event with Javascript-javascript-events

Accepted answer
Score: 18

After downloading FireFox v3.6.27 and doing 7 some test and search. I found my previous 6 answer was wrong.

What I got is:

the oninput 5 event property is supported in Firefox from 4 version 4.

So to add a event listener in 3 this case, you can do either

<input id = "q" oninput="alert('blah')">


q.addEventListener('input', function(){alert("blah");}, true);

But I prefer 2 the later way. You can find reasons in addEventListener.
Also 1 a similar function in IE attachEvent.

More Related questions