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)"  />

Comments

Popular posts from this blog

Call PHP Function In JavaScript Using Ajax

List of Post Category Wise in wordpress