首页 > 技术文章 > jsp <input type="checkbox" name="fileId"> 是否选中

start-fxw 2016-11-22 15:49 原文

  jsp <input type="checkbox" name="fileId"> 是否选中

var a = document.getElementsByName("fileId");for(k in a){
  if(a[k].checked){
    alert(是);
  }else{
    alert(否);
  }
}

 

推荐阅读