You can use the addEventListener function in this text field
var tb = document.getElementById("textbox"); tb.addEventListener("change", function(evt) { alert(tb.value); }, false);
But for older versions of IE (IE6) this will not work. For this you can use addEvent
source share