Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

Element.onkeyup

« DOM Reference

Summary

The onkeyup property returns the onKeyUp event handler code for the current element.

Syntax

element.onkeyup = event handling code

Example

 <input type="text" onKeyUp="keyWasPressed(event)">
 <script>function keyWasPressed(evt){ alert(evt.keyCode) }</script>

Notes

The keyup event is raised when the user releases a key that's been pressed.

Specification

Not part of specification.

Document Tags and Contributors

 Contributors to this page: teoli
 Last updated by: teoli,