/ Published in: JavaScript
Check if user has intruded a real email address. Return true (real email) or false (fake email).
Arguments: Element from a form.
From book Dom Scripting by Jeremy Keith
Arguments: Element from a form.
From book Dom Scripting by Jeremy Keith
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function isEmail(field) { if (field.value.indexOf("@") == -1 || field.value.indexOf(".") == -1) { return false; } else { return true; } }