<form name="form1" method="post" action="#">
<input type="hidden" value="100" name="a">
<input type="hidden" value="200" name="b">
</form>
<input type="hidden" value="100" name="a">
<input type="hidden" value="200" name="b">
</form>
<input type="checkbox" name="c1" value='1' onclick="getValue('200')">
然后把值付给隐含字段
<!--
function go()
{
var e = document.all.tags("input");
var strTemp = "";
for(var i=0;i<e.length;i++)
{
if(e.type = "checkbox" && e[i].checked)
{
strTemp += e[i].value + ",";
}
}
document.getElementById("hid").value = strTemp;
alert(document.getElementById("hid").value);
frmTest.submit();}
//-->
</script>
<form method=post action="" name="frmTest">
<table border=1 width="480">
<tr>
<th>选择</th><th>序号</th><th>费用</th>
</tr>
<tr>
<td align="center">
<input type="checkbox" name="c1" value='100'></td>
<td align="center">1</td>
<td align="center">100</td>
</tr>
<tr>
<td align="center">
<input type="checkbox" name="c2" value='200'></td>
<td align="center">2</td>
<td align="center">200</td>
</tr>
<tr>
<td align="center">
<input type="checkbox" name="c3" value='100'></td>
<td align="center">1</td>
<td align="center">100</td>
</tr>
<tr>
<td align="center">
<input type="checkbox" name="c4" value='200'></td>
<td align="center">2</td>
<td align="center">200</td>
</tr>
</table>
<button onclick="go()">ok</button>
<input type="hidden" id="hid"></form>