<input type="checkbox" id="zyss" name="keyId">注意事项 
<input type="checkbox" id="ggxx" name="keyId">公共信息
...
<input type="button" name="submit1" value="查询" class="button" 
onclick="func()">&nbsp;&nbsp;function func(){
  if(document.getElementById("zyss").checked ==false && document.getElementById("ggxx").checked ==false){
   alert("error")
}else{
   document.forms[0].submit()
}
}

解决方案 »

  1.   

    ...
    <input type="checkbox" id="zyss" name="keyId">注意事项 
    <input type="checkbox" id="ggxx" name="keyId">公共信息
    ...<script language="javascript" type="text/javascript">
    <!--
    var chkNum = 0;
    var chkbox = document.getElementsByName('keyId');
    for(var i=0;i<chkbox.length;i++){
      if(chkbox[i].checked){
        chkNum++;
      }
    }
    if(chkNum==0){
      alert('please select ...');
      // your other code
      return false;
    }else{
      // your other code
      return false;
    }
    //-->
    </script>