<!doctype HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title> Web effects Regular expression verification email address </title>
<body style= "background: #fff;" >
<p style= "margin-bottom:20px;" >
Enter the email address, click Test, the wrong address will return false ... Right, show it? Guess for yourself:
</p>
<input type= "text" value= "" id= "Mail"/>
<input type= "button" value= "Test" id= "Checkout" onclick= "Isvalidmail (stext)"/>
<script type= "Text/javascript" >
var stext = document.getElementById (' mail '). Value;
document.getElementById (' Mail '). onblur = function svalue () {
Stext = This.value;
}
function Isvalidmail (stext) {
var remail =/^ (?: [a-za-z0-9]+[_-+.]?) *[a-za-z0-9]+@ (?:( [a-za-z0-9]+[_-]? *[a-za-z0-9]+.) + ([A-za-z]{2,}) +$/;
Alert (Remail.test (stext))
}
</script>
</body>