Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

onkeyup event

onkeyup event

Event Object Reference Event Object

Example

Execute JavaScript code when the user releases a keyboard button:

Try it »


Definition and Usage

The onkeyup event occurs when a keyboard key is released.

**Tip:** The order of events associated with the onkeyup event:

  1. onkeydown
  2. onkeypress
  3. onkeyup

Syntax

In HTML:

<

element

onkeyup="

SomeJavaScriptCode

">

In JavaScript:

object

.onkeyup=function(){

SomeJavaScriptCode

};

Parameters Description
SomeJavaScriptCode Required. Specifies the JavaScript to be executed when the event occurs.

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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: , ,
, , ,