sábado, 27 de octubre de 2012

Solo valores numericos..#2


<html>
<head>
<b>Clase25-09-2012</b>
</head>
 <body>
  <form>
  <input type="text" name="correo"   onChange = "validar(this.value)" >
  <input type="text" id="fecha"  onChange = "fecha(this.value)" >
  <input type="text" id="telefono"  onChange = "validar(this.value)"  >

</form>
 </body>


 <script type="text/javascript">
 function validar(x){
y= x.length
for(i=0; i<y; i++){
z= x.substring(i,i+1);
if(z=="@" )
{alert(x)}
else{
alert("no ingreso "@"")}
}
 }

 function fecha(f)

 </script>
 </html>

No hay comentarios:

Publicar un comentario