我在页面上有以下复选框代码。我需要在页面加载时默认检查它们。这将显示查询的结果。现在,当取消选中其中一个复选框时,需要提交表单并需要显示不同的查询结果。即使我取消选中一个框,复选框也总是被选中。有人可以在这里指导我吗?谢谢
<form action="abc.cfm?show=yes" method="post" name="myform">
<table align="center"><tr>
<td>
<input type="checkbox" checked="checked" name="chkbox" id="chkbox1"> <font size="3+"><strong> Agreement Only</strong> </font>
<input type="hidden" name="chk" id="chk1">
<input type="checkbox" checked="checked" name="chkbox" id="chkbox2"> <font size="3+"><strong>Active Employees</strong> </font>
<input type="hidden" name="chk" id="chk2">
</td>
<td>
<input type="Submit" name="submitnow" value="View now">
</td>
</table>
</form>
<cfif isdefined("form.chk1")>
query 1
<cfelseif isdefined("form.chk2")>
query 2
</cfif>