我的网页上有需要使用 Coldfusion 验证的复选框,我如何验证每个需要回答的组的至少一个复选框?
<div name="multanswerheader" id="multanswerheader" style="width:100%;">
<div name="multanswerques" id="multanswerques">
<label class="multanswerques">Ques 1:</label>
<label class="multanswerques">Ques 2:</label>
<label class="multanswerques">Ques 3:</label>
<label class="multanswerques">Ques 4:</label>
<label class="multanswerques">Ques 5:</label>
</div>
<div name="multanswera" id="multanswera">
<div class="multanswerques"><input type="checkbox" name="multradio1" value="1" <cfif ListFind(form.multradio1,"1") GT 0>checked="checked"</cfif>>A</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio2" value="1" <cfif ListFind(form.multradio2,"1") GT 0>checked="checked"</cfif>>A</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio3" value="1" <cfif ListFind(form.multradio3,"1") GT 0>checked="checked"</cfif>>A</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio4" value="1" <cfif ListFind(form.multradio4,"1") GT 0>checked="checked"</cfif>>A</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio5" value="1" <cfif ListFind(form.multradio5,"1") GT 0>checked="checked"</cfif>>A</input></div>
</div>
<div name="multanswerb" id="multanswerb">
<div class="multanswerques"><input type="checkbox" name="multradio1" value="2" <cfif ListFind(form.multradio1,"2") GT 0>checked="checked"</cfif>>B</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio2" value="2" <cfif ListFind(form.multradio2,"2") GT 0>checked="checked"</cfif>>B</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio3" value="2" <cfif ListFind(form.multradio3,"2") GT 0>checked="checked"</cfif>>B</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio4" value="2" <cfif ListFind(form.multradio4,"2") GT 0>checked="checked"</cfif>>B</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio5" value="2" <cfif ListFind(form.multradio5,"2") GT 0>checked="checked"</cfif>>B</input></div>
</div>
<div name="multanswerc" id="multanswerc">
<div class="multanswerques"><input type="checkbox" name="multradio1" value="3" <cfif ListFind(form.multradio1,"3") GT 0>checked="checked"</cfif>>C</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio2" value="3" <cfif ListFind(form.multradio2,"3") GT 0>checked="checked"</cfif>>C</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio3" value="3" <cfif ListFind(form.multradio3,"3") GT 0>checked="checked"</cfif>>C</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio4" value="3" <cfif ListFind(form.multradio4,"3") GT 0>checked="checked"</cfif>>C</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio5" value="3" <cfif ListFind(form.multradio5,"3") GT 0>checked="checked"</cfif>>C</input></div>
</div>
<div name="multanswerd" id="multanswerd">
<div class="multanswerques"><input type="checkbox" name="multradio1" value="4" <cfif ListFind(form.multradio1,"4") GT 0>checked="checked"</cfif>>D</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio2" value="4" <cfif ListFind(form.multradio2,"4") GT 0>checked="checked"</cfif>>D</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio3" value="4" <cfif ListFind(form.multradio3,"4") GT 0>checked="checked"</cfif>>D</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio4" value="4" <cfif ListFind(form.multradio4,"4") GT 0>checked="checked"</cfif>>D</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio5" value="4" <cfif ListFind(form.multradio5,"4") GT 0>checked="checked"</cfif>>D</input></div>
</div>
<div name="multanswere" id="multanswere">
<div class="multanswerques"><input type="checkbox" name="multradio1" value="5" <cfif ListFind(form.multradio1,"5") GT 0>checked="checked"</cfif>>E</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio2" value="5" <cfif ListFind(form.multradio2,"5") GT 0>checked="checked"</cfif>>E</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio3" value="5" <cfif ListFind(form.multradio3,"5") GT 0>checked="checked"</cfif>>E</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio4" value="5" <cfif ListFind(form.multradio4,"5") GT 0>checked="checked"</cfif>>E</input></div>
<div class="multanswerques"><input type="checkbox" name="multradio5" value="5" <cfif ListFind(form.multradio5,"5") GT 0>checked="checked"</cfif>>E</input></div>
</div>
</div>