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





边栏推荐
猜你喜欢

使用 Blackbox Exporter 测试网络连通性

How to write controller layer code gracefully?

Gérer 1000 serveurs par personne? Cet outil d'automatisation o & M doit être maîtrisé

正斜杠反斜杠的由来

Xiaomi Interviewer: let's talk about the proficient Registration Center for three days and three nights

Memory barrier store buffer, invalid queue

js求所有水仙花数

语音信号特征提取流程:输入语音信号-分帧、预加重、加窗、FFT->STFT谱(包括幅度、相位)-对复数取平方值->幅度谱-Mel滤波->梅尔谱-取对数->对数梅尔谱-DCT->FBank->MFCC

Configuring FTP, enterprise official website, database and other methods for ECS

js例题打印1-100之间所有7的倍数的个数及总和
随机推荐
VNC Viewer方式的远程连接树莓派
语音信号特征提取流程:输入语音信号-分帧、预加重、加窗、FFT->STFT谱(包括幅度、相位)-对复数取平方值->幅度谱-Mel滤波->梅尔谱-取对数->对数梅尔谱-DCT->FBank->MFCC
uview的安装和功能
JDBC读取Mysql数据列表
一个人管理1000台服务器?这款自动化运维工具一定要掌握
manim 数学引擎
使用 Blackbox Exporter 测试网络连通性
Hutool symmetric encryption
boundvalueops和opsforvalue区别
js打印99乘法表
Xiaomi Interviewer: let's talk about the proficient Registration Center for three days and three nights
postgreSQL在windows系统遇到权限否认(permission denied)
Custom palette for ggplot2
内存屏障今生之Store Buffer, Invalid Queue
apifox学习
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
How torch. gather works
JDBC参数化查询示例
Nature、science、cell旗下刊物
js输出1-100之间所有的质数并求总个数