if (!/[\w.]+@[\w.]+\.\w+/.test(form.email.value)) alert("Please enter a valid email address.");