Wednesday, March 28, 2012

get key code in javascript




<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script language="javascript">

function keyCode(evt,x)
 {

         var charCode = (evt.which) ? evt.which : event.keyCode ; alert(charCode);
}

</script>
<input type="text" onkeyup="return keyCode(event , this)"  />

No comments:

Post a Comment

If you Satisfied , Please Leave a comment