首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

后台如何将值传给复选框

2012-10-26 
后台怎么将值传给复选框后台怎么将值传给复选框??????有没有直接传数组的???trthlabel value${tids

后台怎么将值传给复选框
后台怎么将值传给复选框??????  有没有直接传数组的???

<tr><th><label value="${tids}" name="tids"/><#list typeList as teacher><li style="width: 33%; display: block; float: left;"><inputtype="checkbox" id="teacher_ids_${teacher.type_id}" name="teacher_ids"value="${teacher.type_id }" /> ${teacher.name}</li> </#list><script>  var idstr = document.getElementsByName("tids")[0].value;var strs= new Array(); ids=idstr.split(",");for(var i=0;i<ids.length;i++){var checkbox =document.getElementById("teacher_ids_"+ids[i]);checkbox.checked="checked";//checkbox.setAttribute("checked", true); }  </script></ul></td></tr>

热点排行