老天!值也要在里面写
<INPUT TYPE="checkbox" NAME="checkbox1" value=11>11
得到值的方法
如果你是提交到下一个页面的话
直接用request.form("checkbox1")就可以拉!
如果想在本页得到的话就写在javascript脚本中
for(i=0;i<checkbox.length;i++){
   if(checkbox(i).ckecked){
      取得值 
   }
}

解决方案 »

  1.   

    用.nextSibling.nodeValue或.nextSibling.data均可<INPUT TYPE="checkbox" NAME="checkbox1">11
    <INPUT TYPE="checkbox" NAME="checkbox1">12
    <INPUT TYPE="checkbox" NAME="checkbox1">13
    <INPUT TYPE="checkbox" NAME="checkbox1">14
    <script>
    function document.onclick(){
    var e=window.event.srcElement;
    if(e.type=="checkbox")alert(e.nextSibling.nodeValue)
    }
    </script>
      

  2.   

    checkbox和text是相同的,用JSP:----------HTML----------------------
    <form action=test.jsp >
    <input name=goods value=aaa>
    <input name=goods value=bbb>
    <input name=goods value=ccc>
    <input name=goods value=ddd>
    <input type=submit>
    </form>
    ---------Servlet--------------------
    <%
    String[] goods = request.getParameterValues("goods");
    for(int i=0;i<goods.length;i++) out.println(goods[i]+"<p>");
    %>