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





边栏推荐
- JDBC transaction commit case
- The first part of the construction of the defense system of attack and defense exercise is the introduction and the four stages of Defense
- 请问网页按钮怎么绑定sql语句呀
- 多表联查--07--- Hash join
- Sword finger offer 07 Rebuild binary tree
- ggplot2的自定义调色板
- VNC Viewer方式的远程连接树莓派
- pytorch Default process group is not initialized
- The interviewer of a large front-line factory asked: do you really understand e-commerce order development?
- Speech synthesis: tacotron explains [end-to-end speech synthesis model] [compared with traditional speech synthesis, it does not have complex phonetics and acoustic feature modules, but only uses < te
猜你喜欢

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

Solve the problem of win10 wsl2 IP change

(resolved) NPM suddenly reports an error cannot find module 'd:\program files\nodejs\node_ modules\npm\bin\npm-cli. js‘

yarn create vite 报错 ‘D:\Program‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件

How to download opencv? How to configure opencv after downloading?

js例题打印1-100之间所有7的倍数的个数及总和

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

【软件工程】山东大学软件工程复习提纲

The interviewer of a large front-line factory asked: do you really understand e-commerce order development?

Goodbye, agile Scrum
随机推荐
[compilation principles] review outline of compilation principles of Shandong University
【软件工程】山东大学软件工程复习提纲
剑指 Offer 07. 重建二叉树
JDBC读取Mysql数据列表
2、项目使用的QT组件
js打印99乘法表
Yolov6's fast and accurate target detection framework is open source
log4j:WARN No such property [zipPermission] in org.apache.log4j.RollingFileAppender.
语音信号特征提取流程:输入语音信号-分帧、预加重、加窗、FFT->STFT谱(包括幅度、相位)-对复数取平方值->幅度谱-Mel滤波->梅尔谱-取对数->对数梅尔谱-DCT->FBank->MFCC
Guava scheduled task
R language consumption behavior statistics based on association rules and cluster analysis
突破从0到1后,鲜花电商2.0时代怎么走?
Idea方法模板
Interviewer: do you have any plan to request a lot of data that does not exist in redis to destroy the database?
POI export excle
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
2022 cisp-pte (II) SQL injection
js判断用户输入的数是否为质数(多种方法)
一个人管理1000台服务器?这款自动化运维工具一定要掌握
语音信号处理-概念(一):时谱图(横轴:时间;纵轴:幅值)、频谱图(横轴:频率;纵轴:幅值)--傅里叶变换-->时频谱图【横轴:时间;纵轴:频率;颜色深浅:幅值】