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









边栏推荐
- 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
- How to download opencv? How to configure opencv after downloading?
- 【编译原理】山东大学编译原理复习提纲
- R language consumption behavior statistics based on association rules and cluster analysis
- ggplot2的自定义调色板
- js中输入三个值,并且由小到大输出
- manim 数学引擎
- (已解决) npm突然报错 Cannot find module ‘D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js‘
- volatile 和 synchronized 到底啥区别?
- 1-4 进制表示与转换
猜你喜欢

Rust Async: smol源码分析-Executor篇

One person manages 1000 servers? This automatic operation and maintenance tool must be mastered

VNC Viewer方式的远程连接树莓派

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

(已解决) npm突然报错 Cannot find module ‘D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js‘

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

Goodbye, agile Scrum

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

Cookie加密6

File and multipartfile overview
随机推荐
在线文本数字识别列表求和工具
内存屏障今生之Store Buffer, Invalid Queue
Websocket database listening
Process termination (have you really learned recursion? Test your recursion Foundation)
mysql关于自增和不能为空
使用 Blackbox Exporter 测试网络连通性
Delay queue `delayqueue`
语音合成:Tacotron详解【端到端语音合成模型】【与传统语音合成相比,它没有复杂的语音学和声学特征模块,而是仅用<文本序列,语音声谱>配对数据集对神经网络进行训练,因此简化了很多流程】
Bean拷贝详解
R language calculates Spearman correlation coefficient in parallel to speed up the construction of co occurrence network
Stream常用操作以及原理探索
Nature、science、cell旗下刊物
How can the flower e-commerce 2.0 era go after the breakthrough from 0 to 1?
Interviewer: do you have any plan to request a lot of data that does not exist in redis to destroy the database?
js例题打印1-100之间所有7的倍数的个数及总和
js求所有水仙花数
RNA SEQ data analysis in R - investigate differentially expressed genes in the data!
From 5 seconds to 1 second, the system flies
JDBC读取Mysql数据列表
Sword finger offer 07 Rebuild binary tree