<!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>

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 A&B 的頭像
    A&B

    網頁前端新手上路辛酸史

    A&B 發表在 痞客邦 留言(0) 人氣()