央视领航栏目真假:帮忙解决1道ASP题目?急.....谢谢

来源:百度文库 编辑:神马品牌网 时间:2024/05/01 12:50:23
一、程序填空
(1)一个古老的游戏:石头、剪刀、布。如图所示,游戏者用鼠标单击选择石头、剪刀或布,计算机随机选择,进行比赛。
<%
player=request("choise")
if player=1 or player=2 or player=3 then
select case player
case 1
mychoice="石头"
case 2
mychoice="剪子"
case 3
mychoice="布"
end select
randomize
computer= A +1
select case computer
case 1
choice=”石头”
case 2
choice="剪子"
case 3
choice="布"
end select
if B then
pp="平手"
else if C or play-computer=2 then
pp="恭喜你,你赢了!"
else
pp="这次电脑赢了!"
D
end if
%>
<html>
<title>石头、剪刀、布小游戏</title>
<body>
<center>
<table border=1 align=center>
<col span=2 width=100>
<tr align=center><td>玩家<td>电脑
<tr align=center><td><%=mychoise%><td><%=choise%></tr>
<tr align=center><td colspan><%=pp%></tr>
</table>
<hr>
<form E =lx5-4.asp method=post name=f1>请选择:
<input type=radio name=choice value=1>石头
<input type=radio name=choice value=2>剪刀
<input type=radio name=choice value=3>布
<script for choice=event=onclick language=vbscript>
f1.submit
</script>
</form>
</body>
</html>
(2) 这是一段简单的提交信息的程序,请根据前后逻辑进行填空。
<html>
<head><title>利用表单输入信息</title></head>
<body>
<h3 align="center">asp与表单的交互</h3>
<%
xm=request.form("姓名")
xb=request.form("性别")
if xm<>""then
response.write"<p>欢迎登陆本站点"
F "您是"&xm
if xb="男" then
response.write"大侠"
else
response.write"侠女"
end if
response.write"<p><a href=''>如不对,返回</a>"
response. G
end if
%>
请输入
<form ="3.asp" method=post>
姓名:<input type="text" name="姓名" size=8><br>
性别:男<input type="radio" nanme="性别" value="男" >
女<input type="radio" nanme="性别" value="女"><p>
<input type="sumbit" value="提交">
<input type=" " value="重写">
</form>
</body>
</html>
A: B: C: D: E:
F: G: H: I: J: