判断哪个复选框的checked属性是TRUE,取它的值就是了
如果你知道复选框的个数,可以用FOR循环来判断

解决方案 »

  1.   

    参考以下代码:
    <form name=form1 onsubmit=nn()>
    <input type="checkbox" name="A" value="11">teacher1
    <input type="checkbox" name="A" value="22">teacher2
    <input type="checkbox" name="A" value="33">teacher3
    <input type="checkbox" name="A" value="44">teacher4
    <input type=submit name=submit>
    <script>
    function nn()
    {
        coll = document.getElementsByName("A");
        for(var i=0; i<coll.length;i++)
    if(coll[i].checked)
                alert(coll[i].value);
    }
    </script>
      

  2.   

    <HTML>
    <HEAD>
    <TITLE></TITLE>
    </HEAD>
    <BODY><form name="myform" method="post" ><input type=checkbox name=a value=1>
    <input type=checkbox name=a value=2>
    <input type=checkbox name=a value=3>
    <input type=checkbox name=a value=4>
    <input type=checkbox name=a value=5>
    <br>
    <input type=button value="check it" onclick=chk()></form>
    <script language=javascript>
    function chk()
    {
    for (var i=0;i<5;i++)
    {
    if (document.myform.a[i].checked)
    {
    alert(document.myform.a[i].value)
    return false
    }
    }
    }
    </script></BODY>
    </HTML>
      

  3.   

    <form name=form1 >
    <input type="checkbox" name="A" value="11">teacher1
    <input type="checkbox" name="A" value="22">teacher2
    <input type="checkbox" name="A" value="33">teacher3
    <input type="checkbox" name="A" value="44">teacher4
    <input type=submit name=submit>
    </form>
    另一个页面
    <%
      for i=0 to request.form("A").count
      Response.write "每一个值为"&Request.form("A")(i)&"<br>"
      next%>
      

  4.   

    <%
    //得到选择的项
    String[] strSystemNo = request.getParameterValues("chbx_SystemNo");
    %>
      

  5.   

    在另外个页面
    dim strcode
    strcode=request.form("A")
    然后用split分开得到每个号码值
    然后用for ...next取出来
    做删除等其他操作