未结束的字符串常量
/index.asp, line 20, column 24
response.write "鎴戜滑骞虫墜浜?
代码如下:
<%
Function ComputerChoose()
Dim RandomNum
Dim choice
Randomize
RandomNum=int(rnd*3)+1
if RandomNum=1 then
choice="R"
elseif RandomNum=2 then
choice="S"
else
choice="P"
end if
ComputerChoose=choice
End Function
Sub DetermineWinner(playerChoice,computerChoice)
if playerChoice="R" then
if computerChoice="R" then
response.write "石头-----石头 "
response.write "我们平手了"
elseif computerChoice="S" then
response.write "石头-----剪子 "
response.write "恭喜你,你赢了"
elseif computerChoice="P" then
response.write "石头-----布 "
response.write "恭喜你,你赢了"
end if
elseif playerChoice="S" then
if computerChoice="R" then
response.write "剪子-----石头 "
response.write "恭喜你,你赢了"
elseif computerChoice="S" then
response.write "剪子-----剪子 "
response.write "我们平手了"
elseif computerChoice="P" then
response.write "剪子-----布 "
response.write "恭喜你,你赢了"
end if
elseif playerChoice="P" then
if computerChoice="R" then
response.write "布-----石头 "
response.write "恭喜你,你赢了"
elseif computerChoice="S" then
response.write "布-----剪子 "
response.write "这次我赢了"
elseif computerChoice="P" then
response.write "布-----布 "
response.write "我们平手了"
end if
end if
End sub
%>
玩家:------电脑:
<%
dim player
dim computer
player=request("choice")
if player="P" or player="R" or player="S" then
computer=ComputerChoose()
call DetermineWinner(player,computer)
end if
%>
请选择你的武器: