jQuery keyup()

The jQuery keyup() method is used to attach a function to run when a keyup event occurs i.e, when a keyboard button is released after pressing.


To trigger the keyup event for selected elements.


To add a function to the keyup event.



  • It is an optional parameter.
  • The function parameter specifies the function to run when the event occurs.



<!DOCTYPE html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    	$("input").css("background-color", "turquoise");  
    	$("input").css("background-color", "red");  
Write something: <input type="text">  

Try it

JS Bin on jsbin.com

Content Protection by DMCA.com
Please Share