根据输入的分数,判断得几颗星
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.div {
height: 400px;
width: 200px;
background-color: aqua;
border: 1px;
}
</style>
</head>
<body>
<div id="div"></div>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<script>
var score =prompt('请输入您的分数:');
var str = ''
if (score >= 90) {
str = '⭐⭐⭐⭐⭐';
$('#div').html("优秀" + str)
} else if (score >= 80 && score < 90) {
str = '⭐⭐⭐⭐☆';
$('#div').html("良好" + str)
}
else if (score >= 70 && score < 80) {
str = '⭐⭐⭐☆☆';
$('#div').html("中等" + str)
} else if (score >= 60 && score < 70) {
str = '⭐⭐☆☆☆';
$('#div').html("及格" + str)
}
else {
str = '⭐☆☆☆☆';
$('#div').html("不及格" + str)
}
// console.log(str)
</script>
</body>
</html>