这段ASP代码提示第4行错误 求指点

来源:百度知道 编辑:UC知道 时间:2024/05/24 12:33:29
<%@ language=vbscript%>
<%
dim ipt
ipt=inputbox("请输入成绩","输入一个数值")
if ipt<60 and ipt>=1 then
document.write "不及格"
elseif ipt>=60 and ipt<70 then
document.write "及格"
elseif ipt>=70 and ipt<90 then
document.write "良好"
elseif ipt>=90 and ipt<=100 then
document.write "优秀"
else
msgbox "请输入一个1-100之间的数"
end if
%>

asp里不支持inputbox和msgbox,如果要接收用户输入可以在页面上用
<form action="上面页面的地址" method="post">
请输入成绩:<input name="c" type="text"><input type=submit>
</form>

然后在asp程序里写入:
<%@ language=vbscript%>
<%
dim ipt
ipt=request("c")
if ipt<60 and ipt>=1 then
response.write "不及格"
elseif ipt>=60 and ipt<70 then
response.write "及格"
elseif ipt>=70 and ipt<90 then
response.write "良好"
elseif ipt>=90 and ipt<=100 then
response.write "优秀"
else
response.write "请输入一个1-100之间的数"
end if
%>