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





边栏推荐
- Mobile security tools -jad
- Nature、science、cell旗下刊物
- window右键管理
- Configuring FTP, enterprise official website, database and other methods for ECS
- 1-4 decimal representation and conversion
- 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
- win10远程连接云服务器
- JDBC transaction commit case
- IDEA连接数据库报错
- The song of cactus -- throwing stones to ask the way (1)
猜你喜欢

Multi table associated query -- 07 -- hash join

js中判断奇偶的函数,求圆面积的函数

Memory barrier store buffer, invalid queue

vs怎么配置OpenCV?2022vs配置OpenCV详解(多图)

Origin of forward slash and backslash

Yolov6's fast and accurate target detection framework is open source

语音信号处理-概念(二):幅度谱(短时傅里叶变换谱/STFT spectrum)、梅尔谱(Mel spectrum)【语音的深度学习主要用幅度谱、梅尔谱】【用librosa或torchaudio提取】

yarn create vite 报错 ‘D:\Program‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件
![[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

Interviewer: you use Lombok every day. What is its principle? I can't answer
随机推荐
ggplot2的自定义调色板
C# 请问怎么在更新数据库时候调用line与rows
Park and unpark in unsafe
How torch.gather works
log4j:WARN No such property [zipPermission] in org.apache.log4j.RollingFileAppender.
Jupiter notebook file directory
js来打印1-100间的质数并求总个数优化版
Cookie加密6
Nature、science、cell旗下刊物
Self test in the second week of major 4
Bean拷贝详解
通过uview让tabbar根据权限显示相应数量的tabbar
js输出形状
Speech signal processing - concept (4): Fourier transform, short-time Fourier transform, wavelet transform
jupyter notebook文件目录
uview的安装和功能
From 5 seconds to 1 second, the system flies
(resolved) NPM suddenly reports an error cannot find module 'd:\program files\nodejs\node_ modules\npm\bin\npm-cli. js‘
(已解决) npm突然报错 Cannot find module ‘D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js‘
多表联查--07--- Hash join