Tema: validacion
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/03/2002, 09:13
ccastillo
 
Fecha de Ingreso: enero-2002
Mensajes: 97
Antigüedad: 23 años, 4 meses
Puntos: 0
validacion

hola me pueden qyudar se puede esto necesito validar que tenga letras o numeros

<SCRIPT LANGUAGE=vbscript for=button1 event="onclick()">
<!--
valor = isalpha(form1.usu.value )
-->
</SCRIPT>
<SCRIPT LANGUAGE=vbscript for=button1 event="onclick()">
<!--

function isalpha(sstring)
dim nchar, i
isalpha = true
for i=0 to len(sstring)
nchar = asc(lcase(mid(sstring,1,i)))
if not ((nchar > 47 and nchar < 58) or (nchar > 96 and nchar < 123) or nchar = 32) then
isalpha = false
exit for
end if
next
end function

-->
</SCRIPT>