Latest web development tutorials

HTML onkeyup event properties

HTML Event Attributes HTML Event Attributes

Examples

Run the script when the key is released:

<input type="text" onkeyup="displayResult()">

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support onkeyup event attributes


Definition and Usage

onkeyup property when the user releases the trigger button (on the keyboard).

Tip: onkeyup events related to the event firing order:

  1. onkeydown
  2. onkeypress
  3. onkeyup

Note: onkeyup property can not be used in the following elements: <base>, <bdo> , <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>.


Differences between HTML 4.01 and HTML5

no.


grammar

<elementonkeyup=" script ">

Property Value

描述
script 规定该onkeyup事件触发时执行的脚本。


HTML Event Attributes HTML Event Attributes