html tutorial - onkeyup Attribute in HTML - html5 - html code - html form

Onkeyup attribute in html

Learn html - html tutorial - Onkeyup attribute in html - html examples - html programs

  • The onkeyup attribute is used to activate an event when the user releases a key.
  • The onkeyup attribute is an Event Attributes.

Syntax for onkeyup attribute in HTML:

<element onkeyup="script">

Applies To:

Element Attribute
All HTML Elements onkeyup

onkeypress Attribute Value:

Value Description
script The script to be run on onkeyup.

Sample Coding for onkeyup Attribute in HTML:

Tryit<!DOCTYPE html>
        <title>Wikitechy HTML onkeyup attribute</title>
         Enter the text:
         <input type="text" id=”tutorials” onkeyup= "onKeyUp()">
            function onKeyUp() 
              alert ("event activated when the user releases a key.");            

Code Explanation for onkeyup Attribute in HTML:

onkeyup Attribute Code Explanation

  1. onkeyup attribute call onKeyUp() JavaScript function when the user releases the key.
  2. onKeyUp() is a JavaScript function which is used to display an alert message.

Output for onkeyup Attribute in HTML:

onkeyup Attribute Output

  1. The output shows the textbox.
  2. onkeyup Attribute Output
  3. User can enter the text in the textbox for example “aaaaaaaaaaaa” (Hold down the a key in keyboard).
  4. onkeyup Attribute Output
  5. When user release the key the alert message is displayed.

Browser Support for onkeyup Attribute in HTML:

Yes Yes Yes Yes Yes

Related Searches to onkeyup Attribute in html

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add to your ad blocking whitelist or disable your adblocking software.