asp问题,高手告诉下

来源:百度知道 编辑:UC知道 时间:2024/09/28 14:13:00
请选择你要订购的水果
<hr>
<form name="form1" method="post" action="">
<p><br>
<input type="checkbox" name="checkbox" value="苹果">
苹果
<br>
<input type="checkbox" name="checkbox2" value="香蕉">
香蕉
<br>
<input type="checkbox" name="checkbox3" value="菠萝">
菠萝
<br>
<input type="checkbox" name="checkbox4" value="西瓜">
西瓜
</p>
<p>
<input type="submit" name="Submit" value="提交">
</p>
</form>
<%
if request.Form("checkbox")="苹果" then
response.Write("您要购买的是苹果")
elseif request.Form("checkbox2")="香蕉" then
response.Write("您要购买的是香蕉&

所有的可选项用同一个名字checkbox
<hr>
<form name="form1" method="post" action="">
<p><br>
<input type="checkbox" name="checkbox" value="苹果">
苹果
<br>
<input type="checkbox" name="checkbox" value="香蕉">
香蕉
<br>
<input type="checkbox" name="checkbox" value="菠萝">
菠萝
<br>
<input type="checkbox" name="checkbox" value="西瓜">
西瓜
</p>
<p>
<input type="submit" name="Submit" value="提交">
</p>
</form>
<%
if request.Form("checkbox")<>"" then
response.Write("你购买的是"&request.Form("checkbox")&"。")
else
response.Write("你什么都没买")
en