In jquery how to attach key up event to an element?

 Posted by Vivek.Ramapuram on 11/7/2014 | Category: jQuery Interview questions | Views: 2125 | Points: 40
Answer:

Here in the script in coding we have to attach or we have to use keyup() method to key up event to a html element
Example:
<script type="text/javascript">

$("#txtKeyPress").keyup(function () { $("#div3").append(" | key UP event fired"); });
</script>


when user leave then key in the “txtKeyPress” textbox then “ | key UP event fired” will be appended in the “div3” element.


Asked In: spotted while learning | Alert Moderator 

Comments or Responses

Login to post response