当前位置:网站首页>js成绩奖惩例题
js成绩奖惩例题
2022-06-27 07:20:00 【I am the sun?】
题目如下:
成绩在[90,100],奖励笔记本电脑
成绩在[75,89],奖励游戏一天
成绩在[60,74],奖励试题一套
成绩在[0,59],奖励辅导班补习
输错,这显示错误
代码如下:
<!--成绩在[90,100],奖励笔记本电脑
成绩在[75,89],奖励游戏一天
成绩在[60,74],奖励试题一套
成绩在[0,59],奖励辅导班补习
输错,这显示错误-->
<!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>成绩决定奖惩</title>
<script type="text/javascript">
var grade = prompt("请输入你的成绩:");
if(grade > 100 || grade < 0 || isNaN(grade)){
alert("哪有成绩是 "+ grade +"的,走开");
}else if(grade >= 90){
alert("成绩 " + grade +"分,奖励一台笔记本电脑");
}else if(grade >= 75){
alert("成绩 " + grade +"分,奖励游戏一天");
}else if(grade >= 60){
alert("成绩 " + grade +"分,奖励试题一套");
}else{
alert("成绩才"+ grade +"分,奖励辅导班补习");
}
</script>
</head>
<body>
</body>
</html>
运行结果如下:









边栏推荐
- (已解决) npm突然报错 Cannot find module ‘D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js‘
- 1-4 decimal representation and conversion
- 碎煤机crusher
- Nature、science、cell旗下刊物
- 语音信号特征提取流程:输入语音信号-分帧、预加重、加窗、FFT->STFT谱(包括幅度、相位)-对复数取平方值->幅度谱-Mel滤波->梅尔谱-取对数->对数梅尔谱-DCT->FBank->MFCC
- Idea method template
- MySQL
- js输出1-100之间所有的质数并求总个数
- 高薪程序员&面试题精讲系列116之Redis缓存如何实现?怎么发现热key?缓存时可能存在哪些问题?
- Jupiter notebook file directory
猜你喜欢
随机推荐
pytorch Default process group is not initialized
R 语言 基于关联规则与聚类分析的消费行为统计
[Software Engineering] software engineering review outline of Shandong University
Interviewer: you use Lombok every day. What is its principle? I can't answer
JDBC parameterized query example
How to implement redis cache of highly paid programmers & interview questions series 116? How do I find a hot key? What are the possible problems with caching?
语音信号处理-概念(二):幅度谱(短时傅里叶变换谱/STFT spectrum)、梅尔谱(Mel spectrum)【语音的深度学习主要用幅度谱、梅尔谱】【用librosa或torchaudio提取】
JDBC参数化查询示例
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
移动安全工具-jad
mysql关于自增和不能为空
js求所有水仙花数
Vs how to configure opencv? 2022vs configuration opencv details (multiple pictures)
Coggle 30 Days of ML 7月竞赛学习
R language calculates Spearman correlation coefficient in parallel to speed up the construction of co occurrence network
R 中的 RNA-Seq 数据分析 - 调查数据中的差异表达基因!
[graduation season] graduation is the new beginning of your life journey. Are you ready
Custom palette for ggplot2
Configuring FTP, enterprise official website, database and other methods for ECS
Delay queue `delayqueue`









