问答详情
源自:2-7 编程练习

请问我这个代码哪里错了?

请问我哪里错了?

<!DOCTYPE HTML>

<html>

<head>

<title>new document</title>

  <meta http-equiv="Content-Type",content="text/html; charset=utf-8"/>

  <script type="text/javascript">

  function lai(){

      var a = confirm("Do you want to open the window?");

      if (a==true)

      {    var b = prompt("Please write the adress you want to go to!","http://www.baidu.com")j;

           if (b!=null){

               window.open('http://www.baidu.com','_blank','width=400,height=500,menubar=no,toolbar=no');

           }

           else{

               alert("Thanks for your using");

           }

      }

      else {

           alert("It is so pity to give up using me!");

      }

  }

  </script>

</head>

<body>

  <input type = "button" value = "Open new window" onclick = "lai()" />

</body>

</html>


提问者:慕少8622884 2015-12-15 09:04

个回答

  • Jason333
    2015-12-15 09:10:13
    已采纳

    第10行 结尾处多了个j 

  • 溯璃
    2015-12-16 09:16:18

    多了个j少个}

  • Caballarii
    2015-12-15 09:10:30

    var b = prompt("Please write the adress you want to go to!","http://www.baidu.com")j;

    多了个字母j