当前位置:网站首页>js用switch输出成绩是否合格
js用switch输出成绩是否合格
2022-06-27 07:20:00 【I am the sun?】
代码:
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>switch成绩大于60合格,小于60不合格</title>
<script type="text/javascript">
var grade = +prompt("请输入成绩:");
switch(true){
case grade>=60 && grade <=100:
console.log("合格");
break;
case (grade >= 0 && grade <60):
console.log("不合格");
break;
default:
console.log("不在成绩范围内。。");
break;
}
</script>
</head>
<body>
</body>
</html>
运行结果:





边栏推荐
- From 5 seconds to 1 second, the system flies
- JDBC读取Mysql数据列表
- Idea方法模板
- 攻防演习防御体系构建之第二篇之应对攻击的常用策略
- 用XGBoost迭代读取数据集
- SQL考勤查询间隔一小时
- js输出形状
- jupyter notebook文件目录
- Speech signal feature extraction process: input speech signal - framing, pre emphasis, windowing, fft- > STFT spectrum (including amplitude and phase) - square the complex number - > amplitude spectru
- Self test in the second week of major 4
猜你喜欢

MySQL

在线文本数字识别列表求和工具

C# 请问怎么在更新数据库时候调用line与rows

程序人生 - 程序员三十五岁瓶颈你怎么看?

How to write controller layer code gracefully?

Win10 remote connection to ECS

Interviewer: do you have any plan to request a lot of data that does not exist in redis to destroy the database?

Coggle 30 Days of ML 7月竞赛学习

js用switch语句根据1-7输出对应英文星期几

Memory barrier store buffer, invalid queue
随机推荐
Self test in the second week of major 4
webscoket 数据库监听
请问如何在网页通过excel文件的形式向后段数据库添加数据
Installation and functions of uview
Basic knowledge | JS Foundation
Stream常用操作以及原理探索
How to write controller layer code gracefully?
How can the flower e-commerce 2.0 era go after the breakthrough from 0 to 1?
File 与 MultipartFile概述
语音信号处理-概念(一):时谱图(横轴:时间;纵轴:幅值)、频谱图(横轴:频率;纵轴:幅值)--傅里叶变换-->时频谱图【横轴:时间;纵轴:频率;颜色深浅:幅值】
cookie加密7 fidder分析阶段
R 中的 RNA-Seq 数据分析 - 调查数据中的差异表达基因!
IDEA连接数据库报错
Interviewer: how to never migrate data and avoid hot issues by using sub database and sub table?
Construction of defense system for attack and defense exercises part II common strategies for responding to attacks
什么是浮选机?
Bean copy details
Window right click management
js打印99乘法表
Delay queue `delayqueue`