[CODE]
<!--这是显示四组数据的网页checklist.asp-->
<form name="frm1" action="<%=handlepage%>" method="post">
<%set rs=server.createobject("adodb.recordset")%>
<!--第一组-->
<%sql="select * from mydata where [yourcondition]"
rs1.open sql,conn,1,1
for i=1 to 4
if not rs1.eof and rs1.bof then
%>
<input type="checkbox" name="a" value="<%=rs1("datatitle")%><%=rs1("datatitle")%><br>
<%else
response.write "没有相关的数据项!"
exit for
end if
next%>
<!--第二组-->
<%
<%sql="select * from mydata where [yourcondition]"
rs2.open sql,conn,1,1
for j=1 to 4
if not rs2.eof and rs2.bof then
%>
<input type="checkbox" name="b" value="<%=rs2("datatitle")%><%=rs2("datatitle")%><br>
<%else
response.write "没有相关的数据项!"
exit for
end if
next%>
<!--第三组-->
<%
<%sql="select * from mydata where [yourcondition]"
rs3.open sql,conn,1,1
for k=1 to 4
if not rs3.eof and rs3.bof then
%>
<input type="checkbox" name="c" value="<%=rs3("datatitle")%><%=rs3("datatitle")%><br>
<%else
response.write "没有相关的数据项!"
exit for
end if
next%>
<!--第四组-->
<%
<%sql="select * from mydata where [yourcondition]"
rs4.open sql,conn,1,1
for n=1 to 4
if not rs.eof and rs.bof then
%>
<input type="checkbox" name="d" value="<%=rs4("datatitle")%><%=rs4("datatitle")%><br>
<%else
response.write "没有相关的数据项!"
exit for
end if
next%>
<%for m=1 to 4
rs&m.close
set rs&m=nothing
%>
</form>
<!--这是接收表单数据的网页-->
<%
dim a(),b(),c(),d(),i,j,k,n
redim a(4),b(4),c(4),d(4)
i=0
j=0
k=0
n=0
for each data in request("a")
a(i)=data
i=i+1
next
for each data in request("b")
b(j)=data
j=j+1
next
for each data in request("c")
c(k)=data
k=k+1
next
for each data in request("d")
d(n)=data
n=n+1
next
'这里的a,b,c,d四个数组中分别存储了前面表单传送过来的数据,如果你是对数组中的元素进行某种对比,则可用上述方法,
'如果只是将表单数据存入数据库中,则直接可以用request("a")...request("d")
%>
[/CODE]
<form action="sell1save.asp" method="post">
1、CPU:
<select name="a1">
<option value="没有">没有
<%
set rs=conn.execute("select distinct 名称 from storage where(数量>0 and 名称 like '%aMD%' or 数量>0 and 名称 like '%intel%')")
do until rs.eof
%>
<option value=<%=rs("名称")%>><%=rs("名称")%>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
单位:<select name="a2">
<%
set rs=conn.execute("select unit from unit")
do until rs.eof
%>
<option value=<%=rs("unit")%>><%=rs("unit")%>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
售价:<input type=text size=4 name="a3">元 
数量:<select name="a4">
<option value=1>1
<%
y=2
do until y>10
%>
<option value=<%=y%>><%=y%>
<%
y=y+1
loop
%>
</select><p>
这是其中的一组数据表单,一共有十二组,其他的就不贴了!