![]() |
Definition and UsageThe onkeyup attribute fires when the user releases a key (on the keyboard). Tip: The order of events related to the onkeyup event:
Applies toThe onkeyup attribute is part of the Event Attributes, and can be used on any HTML elements.
Browser Support
|
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<p>A function is triggered when the user releases a key in the input field. The function transforms the character to upper case.</p>
Enter your name: <input type="text" id="fname" onkeyup="myFunction()">
<script>
function myFunction() { let x = document.getElementById("fname"); x.value = x.value.toUpperCase();
}
</script>
</body>
</html>
html onkeyup attribute |
How to Execute a JavaScript when a user releases a key - HTML onkeyup Attribute | HTML Attribute |
Type
: |
Develop |
Category
: |
Web Tutorial |
Sub Category
: |
HTML Attribute |
Uploaded by
: |
Admin |
Read Article https://horje.com/learn/1434/reference