韩栋演过的电视剧2017:asp怎么实现选中部分商品提交后显示所选中商品啊

来源:百度文库 编辑:中科新闻网 时间:2024/04/28 06:39:05
大家看看这里面的第2题的代码该怎么写啊?
http://school.hlw.cn/subfun/function/jc_ex_show.php?jid=24&eid=34&did=34#f34

我主要是不知道 怎么判断订购水果没有,现在我能实现选择了什么水果,点了订购后,显示出来,但是在订购之前,我没法做到显示“你没有订购水果”,大哥们能帮帮忙吗 最好把所有代码写出来,万分感谢!!

<h3>请选择你所需要订购的水果</h3>
<hr align="left" width="170">
<form name="form1" method="get" action="">
<input name="chk" type="checkbox" id="chk1" value="苹果">
<label for="chk1">苹果</label>
<br>
<input name="chk" type="checkbox" id="chk2" value="香蕉">
<label for="chk2">香蕉</label>
<br>
<input name="chk" type="checkbox" id="chk3" value="菠萝">
<label for="chk3">菠萝</label>
<br>
<input name="chk" type="checkbox" id="chk4" value="橘子">
<label for="chk4">橘子</label>
<input type="submit" name="Submit" value="定购">
</form>
<hr align="left" width="180">
<%
If request.QueryString("chk")<>"" Then
response.Write("您订购了<br>")
response.Write("<font color=""green"">")
Dim chk
chk=split(request.QueryString("chk"),",")
if ubound(chk)>0 then
for i=0 to ubound(chk)
response.Write(chk(i)&"<br>")
next
else
response.Write(request.QueryString("chk"))
End If
response.Write("</font>")
Else
response.write("<font color=""red"">你没有订购水果!</font>")
End If
%>

你可以存到表里面
也可以用session存!