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