日期:2014-05-16 浏览次数:20380 次
<script language="javascript" type="text/javascript" > /** * Check email format */ function emailCheck(obj, labelName) { var objName = eval("document.all."+obj); var pattern = /^([\.a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/; if (!pattern.test(objName.value)) { alert("请输入正确的邮箱地址。"); objName.focus(); return false; } return true; } </script> email:<input type="text" id="email" name="email" maxlength="30" onblur="return emailCheck('email', 'email')" style="text-align: left; width:300px;" />