问答详情
源自:1-8 JavaScript-判断语句(if...else)

怎么运行不出来,判断分数。

  <script type="text/javascript">

  var score=80;

 if(score>=60&&score<=70){document.write("恭喜及格了")};

 else if(score>=80){document.write("优秀")};

 else{document.write("无")};

  </script>


提问者:慕粉1461748147 2016-05-15 18:11

个回答

  • LCchao
    2016-05-15 18:23:37
    已采纳

    <script type="text/javascript">

      var score=80;

     if(score>=60&&score<=70){document.write("恭喜及格了");}

     else if(score>=80){document.write("优秀");}

     else{document.write("无");}

      </script>

    ;位置错误