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']); //看了这些你应该明白了。
?>
<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']); //看了这些你应该明白了。
?>
<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];?>
</form>
<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
%>