我想添加一个 if 语句来包围一些代码。我需要我的 if 语句(但在jquery中):
If (chkSurety.checked = true){
SuretyFullName: { required: true }, // This is validation plugin and must stay like this.
SuretyIDNumber: { required: true},
SuretyPhysicalAddress: { required: true },
SuretyHomeTel: { required: true},
SuretyPlace: { required: true},
SuretyDay: { required: true },
SuretyMonth: { required: true }
}
Else
{
SuretyFullName: { required: false },
SuretyIDNumber: { required: true},
SuretyPhysicalAddress: { required: true },
SuretyHomeTel: { required: true},
SuretyPlace: { required: true},
SuretyDay: { required: true },
SuretyMonth: { required: true }
}
这个 if 语句是 C# 我需要它是 jquery。这已经在一个事件中,所以不希望 checkbox.checked 成为事件,只需要 jquery 中的上述代码即可。
在此先感谢,如果您需要更多信息,请询问:)