1-8请老师检查
来源:1-8 编程练习
慕妹6205103
2020-06-10 12:43:13
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>成绩判断</title>
</head>
<body>
<script>
var score=prompt("请输入学生的成绩");
if (score<0||score>100) {
alert("您输入的成绩有误");
}else{
if (score<60) {
alert("不及格");
}else if (score>=60&&score<=69) {
alert("及格");
}else if (score>=70&&score<=79) {
alert("一般");
}else if (score>=80&&score<=89) {
alert("良好");
}else if (score>=90&&score<=100) {
alert("优秀");
}
}
</script>
</body>
</html>
1回答
好帮手慕星星
2020-06-10
同学你好,代码判断逻辑没有问题,很棒!继续加油,祝学习愉快~
相似问题