Código HTML:
<script language="JavaScript"> <!-- var nav4 = window.Event ? true : false; function acceptNum(evt){ // NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57 var key = nav4 ? evt.which : evt.keyCode; return (key <= 13 || (key >= 48 && key <= 57)); } //--> </script>
Código HTML:
<p><input type="text" name="valor" size="12" maxlength="12" onKeyPress="return acceptNum(event)"></p>
Código HTML:
<script language=javascript type=text/javascript src=scripts/script.js>
Que estoy haciendo mal, porque no me funciona.
GRACIAS