JQuery判断复选框是否选中

来源:互联网 发布:我们如何看待网络用语 编辑:程序博客网 时间:2024/05/18 20:07
        $("input[name='employeeId']").each(              function(){              if($(this).is(':checked')){            flag=true;            }              });            if(flag){                      document.getElementById("formid").submit();            }else{            alert("请至少选择一条数据!");            }         //document.getElementById("operate_result_info").style.display = "block";    }

获取复选框的值

private String chkName;  //getter()、setter() 方法一定要有  public String getChkName(){      return chkName;      }  public void setChkName(String chkName){      this.chkName=chkName;      }  public String execute() throws Exception{          String[] chkValues = this.getChkName().split(", ");  }