| |||
Re: Validar Mayusculas y numericos Hola ebarrios: Vayamos por partes. 1. Tema de mayúsculas. <a href='ir.asp?http://www.forosdelweb.com/mensaje.asp?id=67556' target='_blank'>http://www.forosdelweb.com/mensaje.asp?i...</a> 2. Tema de números JScript Reference: isNaN Method Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). if (!isNaN(numValue)) then //es un número end if Korrikalari |
| |||
Re: Validar Mayusculas y numericos
Código:
<hr noshade size=1><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] <html> <head> <title> Solo numeros </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)); } function acceptMay(){ valor2.value=valor2.value.toUpperCase(); } //--> </script> </head> <body> <input type=text name="valor" size=12 maxlength=12 onKeyPress="return acceptNum(event)"><br> <input type=text name="valor2" size=12 maxlength=12 onKeyPress="acceptMay(this)"><br> </body> </html> |