Antes da tag <head> coloque: <script language='JavaScript'> function SomenteNumero(e){ var tecla=(window.event)?event.keyCode:e.which; if((tecla>47 && tecla<58)) return true; else{ if (tecla==8 || tecla==0) return true; else return false; } } </script> Nop input coloque assim: <input type="text" name="rg" id="rg" tabindex="2" onkeypress="return SomenteNumero(event)"/>