tipico script per consentire solo numeri:
e per consentire anche l'invio (carriage return)?codice:<script type="text/javascript"> function onlyNumbers(evt) { var theEvent = evt || window.event; var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode( key ); var regex = /[0-9]/; if( !regex.test(key) ) { theEvent.returnValue = false; if(theEvent.preventDefault) theEvent.preventDefault(); } } </script>