| Author: Kumar 12 Nov 2008 | Member Level: Gold | Rating:  Points: 2 |
Hi,
Use this javascript ,it just display the ASCII code for the Key pressed.Just take that ascii code do according to your requirements.
<script language="javascript" type="text/javascript"> function KeyPressed(){ document.onkeydown = keydown; function keydown(evt){ if (!evt) evt = event; alert(evt.keyCode); return false; } } </script>
<input type="text" id="txttest" name="txttest" onkeypress="KeyPressed();" />
Thanks&Regards,
Dhilipkumar
|