检测email地址的合法性的js代码:
<script> //检测email合法性 function checkemail(email){ var pattern = /^([a-zA-Z0-9]+[_|_|.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|_|.]?)*[a-zA-Z0-9]+.[a-zA-Z]{2,3}$/; if(pattern.test(email)){ return true; }else{ return false; } } //正则验证email地址 </script>