function Ismail (name)/e-mail value detection
{
if (! Isenglish (name))
return false;
i = Name.indexof ("at");
j = Name Dot LastIndexOf ("at");
if (i = = 1)
return false;
if (i!= j)
return false;
if (i = = Name dot length)
return false;
return true;
}
jquery Verification Mailbox
function Checkemail ()
{
var temp = document.getElementById ("Tbemail");//This sentence can be replaced with the following
var temp = $ ("#tbemail");
Verification of e-mail
var myreg =/^ ([a-za-z0-9]+[_|_|.]?) *[a-za-z0-9]+@ ([a-za-z0-9]+[_|_|.]?) *[a-za-z0-9]+. [A-za-z] {2,3}$/;
if ($ (' #tbemail '). val () = "")
{
Alert ("input email");
}
Else
{
if ($ (' #tbemail '). Val ()!= "")
{
if (!myreg.test (' #tbemail '). Val ())
{
Alert (!myreg.test (Temp.value));
Alert (' Prompt Please enter a valid e_mail! ');
Tbemail.focus ();//bob this sentence is wrong, the reason is not specified tbemail is that, JS Error said there is no definition of tbemail. Change it to the following line OK.
$ (' #tbemail '). focus ()//the cursor to the input box
return false;
}
else{
Alert ("Good Mail");
}
}
}
}
Method Three
**
* Check for e-mail
*
&nbs P * @param {}
* str
* @return {Boolean} true: E-mail,false:<b> is not </b> e-mail;
& nbsp */
this.isemail = function (str) {
& nbsp var re =/^ ([a-za-z0-9]+[_|-|.]?) *[a-za-z0-9]+@ ([a-za-z0-9]+[_|-|.]?) *[a-za-z0-9]+. [A-za-z] {2,3}$/;
return re.test (str);
}