Tema: Validar
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/03/2004, 02:02
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 4 meses
Puntos: 772
Hola, elgabo.

A ver si con este cógido...
Código PHP:
<html>
<
head>
<
script>
function 
validar(obj) {
    
vale=false;
    for(
i=0;i<obj.elements.length;i++)
        if (
obj.elements[i].type=='text')
        if (
obj.elements[i].value!='')
            
vale=true;
    return 
vale;
}
</script>
</head>

<body>
<form action="loquesea" onsubmit="return validar(this)">
<input type="text"/>
<input type="text"/>
<input type="text"/>
<input type="submit"/>
</form>
</body>
</html> 
Saludos,