遗落的圣坛攻略:帮忙看一下这段asp程序有什么问题

来源:百度文库 编辑:高考问答 时间:2024/05/02 02:50:21
代码如下:
<%
if request("id")=1 then result="hello!"
elseif request("id")=2 then result="welcome!"
else result="none..."
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>

</head>

<body>
<% Response.Write(result) %>
</body>
</html>

但是不论我输入1或是2或是其他的值,都会显示:

Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft VBScript 编译器错误 错误 '800a03ea'
语法错误

<%
if request("id")=1 then
result="hello!"
elseif request("id")=2 then
result="welcome!"
else
result="none..."
end if
%>
OR
<%
if request("id")=1 then result="hello!"
if request("id")=2 then result="welcome!"
if result=empty then result="none..."
%>

<%
if request("id")=1 then
result="hello!"
else
if request("id")=2 then
result="welcome!"
else result="none..."
end if
end if
%>