<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>index14-2</title>
<script type="text/javascript">
var x = prompt("請輸入0~100的數字","");
if (x>=90) {
alert("A+");
}else if(90>x && x>=80){
// 2個條件式都要成立AND &&
alert("B");
}else if(80>x && x>=70){
alert("C");
}else if(70>x && x>=60){
alert("D");
}else{
alert("False");
}
</script>
</head>
<body>
</body>
</html>
全站熱搜
留言列表