Copy the code code as follows:
/*
*Verify whether the email format is correct
*Parameter strEmail, the email address that needs to be verified
*/
function chkEmail(strEmail) {
if (!/^/w+([-+.]/w+)*@/w+([-.]/w+)*/./w+([-.]/w+)*$/.test(strEmail)) {
return false;
}
else {
return true;
}
}