oninput

oninput
Type: script code
This event is sent when a user enters text in a textbox. This event is only called when the text displayed would change, thus it is not called when the user presses non-displayable keys.

Example

<!-- This sets the label's text to the textbox value on each keystroke. -->
<script language="javascript">
function setLabel(txtBox){
	document.getElementById('lbl').value = txtBox.value;
}
</script>
<label id="lbl"/>
<textbox oninput="setLabel(this);"/>

This is similar to the onkeypress event used in HTML documents.