Ver Mensaje Individual
  #4 (permalink)  
Antiguo 01/04/2011, 05:01
saul123
 
Fecha de Ingreso: marzo-2011
Mensajes: 119
Antigüedad: 13 años, 1 mes
Puntos: 9
Respuesta: onpaste en input

Hola alsanal

Prueba esto espero que te funcione
Código HTML:
Ver original
  1. <script type="text/javascript">
  2. function validarNum(e)
  3. {
  4.     tecla = (document.all) ? e.keyCode : e.which;
  5.     if (tecla == 8) return true;
  6.     patron = /\d/;
  7.     te = String.fromCharCode(tecla);
  8.     return patron.test(te);
  9. }
  10. </head>
  11. <input type="text" onkeypress = "return validarNum(event)" />
  12. </body>
  13. </html>