VOOZH about

URL: https://www.geeksforgeeks.org/html/html-dom-onkeyup-event/

⇱ HTML DOM onkeyup Event - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML DOM onkeyup Event

Last Updated : 12 Jul, 2025

The HTML DOM onkeyup event in HTML occurs when a key is released after pressing by the user. Order of events related to the onkeyup event.

Syntax:

  • In HTML:
<element onkeyup="myScript">
  • In JavaScript:
object.onkeyup = function(){myScript};
  • In JavaScript, using the addEventListener() method:
object.addEventListener("keyup", myScript);

Example: JavaScript onkeyup Event using the addEventListener() method 

Output:

👁 Image
 

Example 2: By using HTML onkeyup.

Output:

👁 Image
 

We have a complete list of HTML DOM methods, to check those please go through this HTML DOM Object Complete reference article.

Supported HTML tags: All HTML elements, except <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, And <title>

Supported Browsers: The browsers supported by HTML DOM onkeyup Event are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera

We have a Cheat Sheet on Javascript where we covered all the important topics of Javascript to check those please go through Javascript Cheat Sheet-A Basic guide to JavaScript.

Comment