问答详情
源自:2-1 JavaScript-输出内容(document.write)

为什么不显示呢

<!DOCTYPE HTML>

<html>

<head>

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

<title>document.write</title>

  <script type="text/javascript">

    var mystr="我是";

    var mychar="JavaScript";

    document.write(mychar+"<br>");

    document.write(mastr+mychar+"的忠实粉丝!");

  </script>

</head>

<body>

</body>

</html>


提问者:qq_半_9 2018-03-03 10:54

个回答

  • qq_半_9
    2018-03-03 11:24:15

    thank you!

  • 荆棘鸟LL
    2018-03-03 11:14:00

     document.write(mastr+mychar+"的忠实粉丝!");这行代码的mystr打错成mastr