_01_js_hello.html 510 B

123456789101112131415161718192021222324
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Title</title>
  6. <script src="js/index.js"></script>
  7. </head>
  8. <!--
  9. body: 主要写html 代码
  10. style: 主要写css 代码
  11. script: 主要写JS 代码
  12. -->
  13. <body>
  14. </body>
  15. <script>
  16. // 打印内容
  17. // 如果js 代码比较少我们就直接在html 当中写就可以了
  18. // 但是如果js 代码比较多, 简易大家单独抽取一个js 文件
  19. // console.log("hello world")
  20. console.log(a)
  21. </script>
  22. </html>