//检查email是否正确 function check_email(thisObj) { var reg = /^([a-zA-Z\d][a-zA-Z0-9_]+@[a-zA-Z\d]+(\.[a-zA-Z\d]+)+)$/gi; var rzt = thisObj.value.match(reg); if (thisObj.value.length == 0) { document.getElementById('show_e').innerHTML = "Email不能为空"; return false; } else { if (rzt == null) { document.getElementById('show_e').innerHTML = "Email地址不正确"; return false; } document.getElementById('show_e').innerHTML = ""; return true; } }