javascript - addEventListener click seemingly storing up clicks -
i've got javascript code called html page. on html page, i've got button id "button_id". want function dostuff()
occur when click button, , bit of javascript achieves this:
document.getelementbyid("button_id").addeventlistener("click", function() { dostuff(); }, false);
however, when other things clicked on html page (and work normally), , come click on "button_id" button, dostuff()
executed lots of times. seems if other clicks getting saved eventlistener , getting released @ once.
what's causing this, , how solve problem? btw, i've been using chrome.
thanks.
Comments
Post a Comment