Acá te dejo un ejemplo...
Código:
<html>
<head>
<title> New Document </title>
<script language="JavaScript">
<!--
function checkForm(frm){
if(frm.cole.value == ""){
alert("Informa el colegio");
frm.cole.focus();
return false;
}
if (frm.email.value == "") {
alert("Por favor ingrese su dirección de e-mail");
frm.email.focus();
return false;
}
if (frm.email.value.indexOf('@', 0) == -1 || frm.email.value.indexOf('.', 0) == -1) {
alert("Dirección de e-mail inválida");
frm.email.focus();
return false;
}
if(frm.tel.value == ""){
alert("Informa el telefono");
frm.tel.focus();
return false;
}
if(frm.nombre.value == ""){
alert("Informa el nombre");
frm.nombre.focus();
return false;
}
if(frm.Educacion.checked){
frm.Educacion.value = "SI";
}
if(frm.Cursos.checked){
frm.Cursos.value = "SI";
}
if(frm.Tutoriales.checked){
frm.Tutoriales.value = "SI";
}
if(frm.Otro.checked){
frm.Otro.value = "SI";
}
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<form method=post action="http://www.melodysoft.com/cgi-bin/form.cgi" onSubmit="return checkForm(this);">
<input type="hidden" name="recipient" value="[email protected]">
<input type="hidden" name="subject" value="Secundario">
Colegio <input type="text" name="cole"><br>
E-mail<input type="text" name="email"><br>
Telefono<input type="text" name="tel"><br>
Nombre completo<input type="text" name="nombre"><br>
Deseo recibir noticias sobre:<br>
<input name=Educacion type=checkbox> Educación<br>
<input name=Cursos type=checkbox> Cursos<br>
<input name=Tutoriales type=checkbox> Tutoriales en la red<br>
<input name=Otro type=checkbox> Otro<br><br>
<input type="submit" value=Enviar>
</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]