onkeyup event | keyup event
Occurs on an element that has the focus when the user releases a key.
- Use the onkeydown and onkeypress events to receive a notification when a key is pressed or while a key is being held down.
- To get the released key, use the keyCode and which event properties.
How to register:
|object.onkeyup = handler;|
|object.addEventListener ("keyup", handler, useCapture);|
|object.attachEvent ("onkeyup", handler);|
You can find the related objects in the Supported by objects section below.
The event object is accessible to all event handlers in all browsers. The properties of the event object contain additional information about the current event. To get further details about these properties and the possible event handler registration methods, please see the page for the event object.
Actions that invoke the onkeyup event:
- Releasing a key.
The order of events related to the onkeyup event:
Example HTML code 1:
This example illustrates the use of the onkeyup event:
Did you find this example helpful?
Supported by objects:
a, abbr, acronym, address, applet, area, b, bdo, big, blink, blockquote, body, button, caption, center, cite, code, dd, del, dfn, dir, div, dl, dt, em, embed, fieldset, font, form, h1, h2, h3, h4, h5, h6, hr, html, i, img, input:button, input:checkbox, input:file, input:image, input:password, input:radio, input:range, input:reset, input:search, input:submit, input:text, ins, isindex, kbd, keygen, label, legend, li, listing, map, marquee, menu, nobr, noframes, object, ol, p, plaintext, pre, q, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var, xmp
User Contributed Comments