html提交未填写变色,未填写“隐藏”必填字段即可提交字段,除非已选中

您的验证是在HTML的此功能正在做:

function checkWholeForm65983(theForm) {

var why = "";

if (theForm.FirstName) why += isEmpty(theForm.FirstName.value, "First Name");

if (theForm.LastName) why += isEmpty(theForm.LastName.value, "Last Name");

if (theForm.EmailAddress) why += checkEmail(theForm.EmailAddress.value);

if (theForm.HomePhone) why += isEmpty(theForm.HomePhone.value, "Home Phone Number");

if (theForm.CaptchaV2) why += captchaIsInvalid(theForm, "Enter Word Verification in box below", "Please enter the correct Word Verification as seen in the image");

if (theForm.CAT_Custom_257593) why += isEmpty(theForm.CAT_Custom_257593.value, "Member Number");

if (theForm.CAT_Custom_255275) why += checkDropdown(theForm.CAT_Custom_255275.value, "Available Dates");

if (theForm.CAT_Custom_255276) why += checkDropdown(theForm.CAT_Custom_255276.value, "Number of Tickets");

if (theForm.CAT_Custom_255277) why += checkSelected(theForm.CAT_Custom_255277, "Payment Method");

if (theForm.CAT_Custom_255279) why += isEmpty(theForm.CAT_Custom_255279.value, "Questions/Message or Other Information");

if (why != "") {

alert(why);

return false;

}

if (submitcount65983 == 0) {

submitcount65983++;

theForm.submit();

return false;

} else {

alert("Form submission is in progress.");

return false;

}

}

具体CAT_Custom_255277是什么,是再次确认付款选项正在被填补。如果选择Member = $0,我们希望忽略此检查。因此,尝试这样的事情:

if (theForm.CAT_Custom_255277 && theForm.CAT_Custom_255276.value != "1")

why += checkSelected(theForm.CAT_Custom_255277, "Payment Method");

我们把它设置为"1"的原因是因为你的Member = $0选项设置为"1":

Member = $0

希望这个作品!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值