Hola...
Como hago para que un text box solo acepte numeros, y no letras.?
Gracias
| |||
Re: Text Box !!! Algo así te sirve? <pre><html> <head> <title> New Document </title> <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> </head> <body> <input type=text name="valor" size=12 maxlength=12 onKeyPress="return acceptNum(event)"> </body> </html> </pre> <hr noshade size=1 color="#000000"><img src="http://www.gograph.com/Images-8712/ClipArt/cat03.gif" height="50" border=0 align="absmiddle"> <font size="2" face="verdana" color="#000000">bet[/CODE] |