onkeyup event
Example
Execute JavaScript code when the user releases a keyboard button:
Try it »
Definition and Usage
The onkeyup event occurs when a keyboard key is released.
**Tip:** The order of events associated with the onkeyup event:
- onkeydown
- onkeypress
- onkeyup
Syntax
In HTML:
<
element
onkeyup="
SomeJavaScriptCode
">In JavaScript:
object
.onkeyup=function(){
SomeJavaScriptCode
};
| Parameters | Description |
|---|---|
| SomeJavaScriptCode | Required. Specifies the JavaScript to be executed when the event occurs. |
Browser support





All major browsers support the onkeyup event
HTML tags that support the onkeyup event:
The onkeyup attribute can be applied to all HTML elements, except:
, , ,
Event Object