boutique replica bags up ideas

the best replique rolex and prices here.

julia highlight 99j hair color 10a quality straight human hair lace front wigs 8 - 24 inches pre plucked hairline 13x4 inches lace front brazilian wig onlinefor sale

JavaScript onkeypress Event Example

Updated on     Kisan Patel

If we want to execute a javascript function when key is pressed from the keyboard on the html element, we need to use javascript onkeypress event.

<!-- HTML -->
Name: <input type="text" id="txtName" name="txtName" onkeypress="TestFunction()" >

<!-- Javascript -->
<script type="text/javascript">
function TestFunction() {
   alert("You pressed a key inside the input field");
}
</script>

In the above code snippet, we have specified onkeypress event on the textbox that executes TestFunction() function. In this function, we are display alert box.

See the Pen waZKra by Kisan (@pka246) on CodePen.


JavaScript

Leave a Reply