javascript - Chrome and oninput events -
i have textbox, , trying fire event oninput (my example below removes comma input, need more advance things). code works great on firefox , internet explorer, when click textbox in chrome, have .5 seconds start typing, otherwise loose focus. testing exact code below on website creates error. idea?
<input type="text" id="question" name="question" oninput="clean(this);" /> <script type="text/javascript"> function clean(q){ q.value=q.value.replace(",",""); } </script>
thanks help
credit goes comfreek , robh pointing out works fine on js fiddle. feel quite dumb not trying first. turns out of other javascript on page causing trigger break. everyone's help!
Comments
Post a Comment