/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> function digitos(event){ if (window.event) { // IE key = event.keyCode; } else if (event.which) { // netscape key = event.which; } if (key != 8 || key != 13 || key < 48 || key > 57) return (((key > 47) && (key < 58)) || (key == 8 ) || (key == 13)); return true; } </script> <!--Campo Telefone--> <input type="text" onkeypress="return digitos(event, this);" />
Comments
