References

Collection of references for web development.

HTML onkeyup event

Description

Execute JavaScript code when the user releases a key.

Example

<div id="output">Type any key into the input field:</div>
<input type="text" onkeyup="document.getElementById('output').innerHTML = 'Character Code: ' + event.keyCode">

Example #2

<script>
function myFunction(event) {
	document.getElementById('output').innerHTML = 'Character Code: ' + event.keyCode; 
}
</script>
<div id="output">Type any key into the input field:</div>
<input type="text" onkeyup="myFunction(event)">