Hi everybody,
What should I do in order to add an onkeyup="foo();" to an input box but without writing the onkeyup="foo();" inside the input field declaration?
Usually you do:
<input type="text" name="hello" value="" class="input-tags" onkeyup="foo();"/>
But I want to do something like this:
<script type="text/javascript">
document.getElementsByName("hello").item(0).addEventListener('keyup',foo(),true);
</script>
and leave the input declaration like this:
<input type="text" name="hello" value="" class="input-tags"/>
Thanks for your time :)