表单是  
      <form   name="formId">  
          <input   type="checkbox"   name="selectField"   value=1>  
          <input   type="checkbox"   name="selectField"   value=2>  
      </form>   

  function   getCheckCount(){  
  var   checkcount   =   0;  
  var   len   =   document.formId.selectField.length;  
  alert(len)  
          for   (var   i   =   0;   i   <   len;   i++)  
  {  
  if   (document.formId.selectField[i].checked==true)  
  {  
  checkcount   =   checkcount   +   1;  
  }  
   
  }  
      return   checkcount;  
  }   
 

相关文章:

  • 2022-01-10
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-06-19
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
相关资源
相似解决方案