HTML onkeyup-eigenschap
Voorbeeld
Een JavaScript-segment wordt uitgevoerd wanneer de gebruiker de knop loslaat:
<input type="text"> onkeyup="displayResult()">
Browser support
IE | Firefox | Chrome | Safari | Opera |
---|---|---|---|---|
All major browsers support the onkeyup attribute.
Definition and usage
The onkeyup attribute triggers when the user (on the keyboard) releases a key.
Tip:Event order relative to onkeyup event:
- onkeydown
- onkeypress
- onkeyup
Note:The onkeyup attribute is not applicable to 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 value
Value | Description |
---|---|
script | Script executed when onkeyup occurs. |