He hecho alguna pruebas y creo que algo tengo mal en esto otro codiho, alguien me podria ayudar???
Código HTML:
<script type="text/JavaScript">
<!--
function pregunta(txt){
//valido el nombre
if (document.netzaj.nombre.value.length==0){
alert("Por Favor Ingrese su Nombre")
document.netzaj.nombre.focus()
return false;
}
if (document.netzaj.apellido.value.length==0){
alert("Por Favor Ingrese su Apellido")
document.netzaj.apellido.focus()
return false;
}
if (document.netzaj.fono.value.length==0){
alert("Por Favor Ingrese su Número Telefónico de Contacto")
document.netzaj.fono.focus()
return false;
}
var b=/^[^@\s]+@[^@\.\s]+(\.[^@\.\s]+)+$/
if (document.netzaj.email.value.length==0){
alert("Email " + (b.test(txt)?"":"no ") + "válido.")
document.netzaj.email.focus()
return b.test(txt)
}
return alert("Estimado,\nGracias por contactarnos, prontos nos pondremos en contact con usted\nTIME");
}
//-->
</script>