I have an HTML input box
I\'ve attached a handler for the \'keyup\' event, but if
There are two kinds of input value: field's property and field's html attribute.
If you use keyup event and field.value you shuld get current value of the field. It's not the case when you use field.getAttribute('value') which would return what's in the html attribute (value=""). The property represents what's been typed into the field and changes as you type, while attribute doesn't change automatically (you can change it using field.setAttribute method).