选中复选框时有没有办法提交表单?
<form id="formName" action="<?php echo $_SERVER['PHP_SELF'];?>" method="get">
<input type ="checkbox" name="cBox[]" value = "3">3</input>
<input type ="checkbox" name="cBox[]" value = "4">4</input>
<input type ="checkbox" name="cBox[]" value = "5">5</input>
<input type="submit" name="submit" value="Search" />
</form>
<?php
if(isset($_GET['submit'])){
include 'displayResults.php';
}
?>
这就是我目前所拥有的,但是当用户选中或取消选中复选框时,我想提交没有提交按钮的表单。有什么帮助吗?