html.html
<form ...>
 <input type=checkbox name="haha[]" value=1>
 <input type=checkbox name="haha[]" value=2>
 <input type=checkbox name="haha[]" value=3>
 <input type=checkbox name="haha[]" value=4></form>test.php
<?
print_r($_POST['haha']); //看了这些你应该明白了。
?>

解决方案 »

  1.   

    <form method="post" action="rec.php">
     <select name="haha[]" multiple>
       <option value=1>1</option>
       <option value=2>2</option>
       <option value=3>3</option>
     </select>
     <input type=submit>
    </form>rec.php
    <?php$arr=$_POST['haha'];
    echo $arr[0];
    echo $arr[1];
    echo $arr[2];?>
      

  2.   

    谢谢,不过还是有点不太明白,我想类似<input type="button" name="button" onclick="javascript:self.open('test.php?id=<?=列表value值?>','','height=350,width=600,toolbar=no, menubar=no, scrollbars=yes,resizable=yes,location=no, status=no')">,这样的方式传值,有没有什么好的方法啊??
      

  3.   

    <form name="tcxk" action="tj.php" method="post" target="zxdc">//表单内容<input name="image2" type="image" onclick="javascript:void(window.open('tj.php','zxdc','scrollbars=no,resizable=no,toolbar=no width=450,height=200,top=100,left=250'))" src="tc/tp.gif" width="47" height="19">
    </form>
      

  4.   

    楼上大哥,我是想传递多选框的value值,不是点击图片打开窗口啊!!
      

  5.   

    ---------- a.asp -------------
    <script lanauage="javascript">
    <!--
      function funsubmit()
      {
        var delvalue = '';
        for(i=0;i<document.all.length;i++)
        {
          if(document.all(i).type == 'checkbox' && document.all(i).checked == true) delvalue+=document.all(i).value+',';
        }
        delvalue = delvalue.substr(0,delvalue.length-1);
        document.all.H1.value=delvalue;
        form1.method='post';
        form1.action='b.asp';
        form1.submit();
      }
    //-->
    </script><form name=form1>
    <input type=checkbox value=0>
    <input type=checkbox value=1>
    <input type=checkbox value=2>
    <input type=checkbox value=3>
    <input type=checkbox value=4>
    <p><input type=button onclick="funsubmit();"></p>
    <input type=hidden name=H1>
    </form>------------- b.asp --------------
    <%
      Dim arrvalue
      Dim i
      arrvalue = split(Trim(request.form("H1")),",")
      for i = 0 to ubound(arrvalue)
        response.write "选中checkbox的value:" & arrvalue(i) & "<br>"
      next
    %>