ASP(vbscript) 按钮无反应

<html><head><title>IF...ELSE嵌套语句</title><scriptlanguage="vbscript">subbutton1_onClick... <html>
<head><title>IF...ELSE嵌套语句</title>
<script language="vbscript">
sub button1_onClick()
dim score
if myform.score.value<>empty then
score=trim(myform.score.value)
else
msgbox "请填写成绩!"
exit sub
end if
if score<60 then
grade="成绩差"
else if score<70 then
grade="成绩可"
else if score<80 then
grade="成绩中"
else if score<90 then
grade="成绩良"
esle if score<=100 then
grade="成绩优"
else
grade="输入的成绩超出范围!"
end if
end if
end if
end if
end if
msgbox score & "," & grade
end sub
</script>
</head>
<body>
<form name="myform" mothod="post" action="ckeck.asp">
成绩:<input type="text" name="score" /><p>
<input type="button" name="button1" value="查看">
</form>
</body>
</html>
展开
 我来答
晨曦大侠
2010-03-14 · 我为人人,人人为我。
晨曦大侠
采纳数:632 获赞数:2297

向TA提问 私信TA
展开全部
<html>
<head><title>IF...ELSE嵌套语句</title>
<script language="vbscript">
sub button1_onClick()
dim score
if myform.score.value<>empty then
score=trim(myform.score.value)
else
msgbox "请填写成绩!"
exit sub
end if
if score<60 then
grade="成绩差"
else if score<70 then
grade="成绩可"
else if score<80 then
grade="成绩中"
else if score<90 then
grade="成绩良"
else if score<=100 then
grade="成绩优"
else
grade="输入的成绩超出范围!"
end if
end if
end if
end if
end if
msgbox score & "," & grade
end sub
</script>
</head>
<body>
<form name="myform" mothod="post" action="ckeck.asp">
成绩:<input type="text" name="score" /><p>
<input type="button" name="button1" value="查看">
</form>
</body>
</html>

其中的esle if score<=100 then写错了,应该是else if score<=100 then
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
hopehaitun
2010-03-14 · TA获得超过161个赞
知道小有建树答主
回答量:174
采纳率:50%
帮助的人:86.4万
展开全部
if score<60 then
grade="成绩差"
else if score<70 then
grade="成绩可"
else if score<80 then
grade="成绩中"
else if score<90 then
grade="成绩良"
esle if score<=100 then
grade="成绩优"
else
grade="输入的成绩超出范围!"

end if
只保留一个end if
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
syt251681107
2010-03-14 · TA获得超过5371个赞
知道大有可为答主
回答量:5680
采纳率:25%
帮助的人:2233万
展开全部
esle if score<=100 then
grade="成绩优"
这个你写错了
正确的是
else if score<=100 then
grade="成绩优"
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式