帮忙减肥。。。
不想用hidden。
index.asp
---------
<script>
function fnc(){
frm.method="post";
frm.action="checkbox.asp";
frm.submit();
}
function fncA(a){
if (frm.all("chk")[a].checked)
{frm.all("hdn")[a].value=1;}
else
{frm.all("hdn")[a].value=0;}
}
</script>
<form name="frm">
<%Dim intI
response.write "<table border=1>"
For intI=0 to 9
response.write "<tr><td><input type='checkbox' name='chk' value='off' onclick='fncA("& intI &");'>"
response.write "<input type='hidden' name='hdn' value='0'></td>"
response.write "<td><input type='text' name='txt' value='" & intI+100 &"'></td></tr>"
Next
response.write "</table>"
%>
<input type="hidden" value="<%=intI%>" name="allCount">
<input type="button" value="Submit" onclick="fnc();">
---------------------------------------------
checkbox.asp
-----
<%
Dim intCnt
Dim rs
Dim boo
intCnt=Request.Form("allCount")
'Response.write Request.Form("chk")
'response.end
rs = Split(Request.Form("txt"),",")
boo= Split(Request.Form("hdn"),",")
For i=0 to Ubound(rs)
if boo(i)=1 then
Response.write rs(i) & "<br>"
end if
Next
%>