onkeyupEvent
Examples
Execute JavaScript code when the user releases a keyboard button:
<input type="text" onkeyup="myFunction()">
Try it yourself »
Definition and Usage
The onkeyup event occurs when a keyboard key is released.
Tip:The order of events related to the onkeyup event:
- onkeydown
- onkeypress
- onkeyup
Syntax
In HTML:
<element
onkeyup="SomeJavaScriptCode">
In JavaScript:
object.onkeyup=function(){SomeJavaScriptCode};
| Parameter | Description |
|---|---|
| SomeJavaScriptCode | Required. Specifies the JavaScript to execute 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: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title>.
Event Object Other Extensions