
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> 展开
<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> 展开
展开全部
<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
<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
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
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
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
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
esle if score<=100 then
grade="成绩优"
这个你写错了
正确的是
else if score<=100 then
grade="成绩优"
grade="成绩优"
这个你写错了
正确的是
else if score<=100 then
grade="成绩优"
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询