var TOKEN_JSID="gdhancheng_c8741f5ea5b27b225d9cf4df52439d2c"; function IsMatchingAddress(str){ var myRegExp = /[a-z0-9-]{1,30}@[a-z0-9-]{1,65}.[a-z]{2,}/ ; return myRegExp.test(str) } function feedBackSubmitCheck(form) { //document.getElementById('').value = ''; console.log(form) console.log(form.orderlist_name.value) form.img_code_token.value = 'gdhancheng_c8741f5ea5b27b225d9cf4df52439d2c'; if(form.orderlist_name && form.orderlist_name.value=='') { alert('请填写您姓名!!') form.orderlist_name.focus() return false } if(form.orderlist_adds && form.orderlist_adds.value=='') { alert('请填写您的地址!!') form.orderlist_adds.focus() return false } if(form.orderlist_mail && form.orderlist_mail.value=='') { alert('E-mail地址不能为空!!') form.orderlist_mail.focus() return false } if(form.orderlist_mail && !IsMatchingAddress(form.orderlist_mail.value)){ alert('E-mail地址格式不正确!!') form.orderlist_mail.focus() return false } if(form.orderlist_tell && form.orderlist_tell.value=='') { alert('请填写您的电话号码!!') form.orderlist_tell.focus() return false } if (form.orderlist_speak && form.orderlist_speak.value=='') { alert('请填写您的留言内容!!') form.orderlist_speak.focus() return false } if (form.code_feedback && form.code_feedback.value=='') { alert('请填写验证码!!') form.code_feedback.focus() return false } } function getVerifyCodeImg(imgEle){ let img = 'https://logins.114my.cn/app/yulecheng/code_handler_for_html.php?member=forFeedbackPageMember' + '&token=' + TOKEN_JSID + '&t=' + Math.random()*10; imgEle.src = img; }