Latest web development tutorials

onkeyup event

Event Object Reference Event objects

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:

  1. onkeydown
  2. onkeypress
  3. onkeyup

grammar

In HTML:

<element onkeyup="SomeJavaScriptCode">

In JavaScript:

object .onkeyup=function(){SomeJavaScriptCode};

参数 描述
SomeJavaScriptCode 必需。规定该事件发生时执行的 JavaScript。


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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 Object Reference Event objects