Saturday, July 31, 2010

How to validate an email address using JavaScript?

Quick and easy:

function isValidEmail(str) {
return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}

1 comment:

  1. Triton sunscreen with titanium dioxide and micronomy
    The titanium sponge best thing about triton is the long-lasting thunder titanium lights effect of titanium bikes for sale these, titanium touring because they have does titanium have nickel in it a long shelf life. Triton is the perfect product to help protect against

    ReplyDelete