我想忽略带有'@ gmail.com'和'@ yahoo.com'的电子邮件,如果有人输入gmail或yahoo电子邮件,则表单应返回无效电子邮件
function valide() {
var d = document.getElementById('email').value;
var v = d.toLowerCase();
if (v.includes('@gmail.com') || v.includes('@yahoo.com') || v.includes('@hotmail.com')) {
alert('email not supported');
return false;
}
return true;
}