当前位置:网站首页>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>
运行结果:





边栏推荐
猜你喜欢

Vs how to configure opencv? 2022vs configuration opencv details (multiple pictures)

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

cookie加密7 fidder分析阶段

(已解决) MINet 进行测试时报错如下 raise NotImplementedError

File and multipartfile overview
![Speech signal processing - concept (II): amplitude spectrum (STFT spectrum), Mel spectrum [the deep learning of speech mainly uses amplitude spectrum and Mel spectrum] [extracted with librosa or torch](/img/b3/6c8d9fc66e2a4dbdc0dd40179266d3.png)
Speech signal processing - concept (II): amplitude spectrum (STFT spectrum), Mel spectrum [the deep learning of speech mainly uses amplitude spectrum and Mel spectrum] [extracted with librosa or torch

Error in idea connection database
![[graduation season] graduation is the new beginning of your life journey. Are you ready](/img/4e/aa763455da974d9576a31568fc6625.jpg)
[graduation season] graduation is the new beginning of your life journey. Are you ready

Win10 remote connection to ECS

多表联查--07--- Hash join
随机推荐
Jupiter notebook file directory
Interviewer: how to never migrate data and avoid hot issues by using sub database and sub table?
获取地址url中的query参数指定参数方法
Hutool symmetric encryption
js来打印1-100间的质数并求总个数优化版
语音信号处理-概念(一):时谱图(横轴:时间;纵轴:幅值)、频谱图(横轴:频率;纵轴:幅值)--傅里叶变换-->时频谱图【横轴:时间;纵轴:频率;颜色深浅:幅值】
[compilation principles] review outline of compilation principles of Shandong University
js打印99乘法表
JDBC参数化查询示例
The interviewer of a large front-line factory asked: do you really understand e-commerce order development?
延时队列`DelayQueue`
yarn create vite 报错 ‘D:\Program‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件
(已解决) npm突然报错 Cannot find module ‘D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js‘
guava 教程收集一些案例慢慢写 google工具类
JDBC操作Mysql示例
Origin of forward slash and backslash
mssql如何使用语句导出并删除多表数据
一个人管理1000台服务器?这款自动化运维工具一定要掌握
How torch.gather works
请问如何将数据从oracle导入fastDFS?