chuangzi

js--prompt对话框

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>prompt</title>
<script>
function rec() {
var score;
score =prompt("请输入你的成绩,1-100数值之间");
if(score>90){
document.write("好棒啊");
}
else if(score>=75){
document.write("不错哦");
}
else if(score>=60){
document.write("及格了");
}
else if(score<60&&score>=0){
document.write("加油吧");
}
else{
document.write("请输入正确数值");
}
}
</script>
</head>
<body>
<input type="button" name="button" onClick="rec()" value="点击我,对成绩做评价">
</body>
</html>

分类:

技术点:

相关文章:

  • 2021-11-11
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2021-08-23
  • 2021-11-05
  • 2022-12-23
猜你喜欢
  • 2021-07-12
  • 2021-09-16
  • 2021-11-17
  • 2021-12-27
  • 2022-12-23
  • 2021-08-10
相关资源
相似解决方案