HTML onkeyupEvent Attributes
Examples
Run a script when a key is released:
<input type="text" onkeyup="displayResult()">
Try it yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the onkeyup event attribute.
Definition and Usage
The onkeyup attribute triggers when the user releases a key (on the keyboard).
Tip:The order of events related to the onkeyup event:
- onkeydown
- onkeypress
- onkeyup
Note:The onkeyup attribute cannot be used on the following elements: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>.
Differences between HTML 4.01 and HTML5
None.
Syntax
<element onkeyup="script">
Attribute Values
| Value | Description |
|---|---|
| script | Specifies the script to be executed when the onkeyup event is triggered. |
HTML Event Attributes Other Extensions