Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/03/2002, 15:50
bet
 
Fecha de Ingreso: febrero-2001
Mensajes: 292
Antigüedad: 23 años, 2 meses
Puntos: 0
Re: Mas rapido que inmediatamente.........

Código:
 
<html>
<head>
<title> Validar Formulario </title>

<script language="Javascript1.2">
<!--


function checkForm(frm){

	var email = frm.email.value;
	var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
	flag = pattern.test(email);	
	if(!flag)	{		
		alert("Error en el mail");
		frm.email.focus();
		return false;	
	}

	if (frm.segundo.value == ""){
		alert("Error en otro campo");
		frm.otrocampo.focus();
		return false;	
	}


}


//-->
</script></head>

<body>
<form name="f1" method="post" action="" onSubmit="return checkForm(this)"">
<input name="email" type="text"><br>
<input name="segundocampo" type="text"><br>
<input name="tercercampo" type="text"><br>

<input type="submit">

</form>
</body>
</html>
<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]