onkeyup event
Examples
Javascript code execution when the user releases the keypad buttons:
<input type="text" onkeyup="myFunction()">
try it"
Definition and Usage
onkeyup event occurs when the keyboard key is released.
Tip: onkeyup events related to the event occurrence order:
- onkeydown
- onkeypress
- onkeyup
grammar
In HTML:
<element
onkeyup="SomeJavaScriptCode">
In JavaScript:
object .onkeyup=function(){SomeJavaScriptCode};
参数 | 描述 |
---|---|
SomeJavaScriptCode | 必需。规定该事件发生时执行的 JavaScript。 |
Browser Support
All major browsers support onkeyup event
It supports HTML tags onkeyup event:
onkeyup property can be applied to all HTML elements except: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style> , and <title>.
Event objects