<SCRIPT LANGUAGE=Javascript RUNAT=Server>
function isEmail(strEmail) {
if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
return true;
else
alert("请输入正确的邮箱");
}
</SCRIPT>
<form method=post>
<input type=text onblur=isEmail(this.value)>
<input type=submit value=提交>
</form>