1、右键在桌面新建一个文本文档。


2、双击打开将以下代码复制到其中<!DOCTYPE html><head> <meta charset="UTF-8"> <title>Document</title> <script> document.write("hello world!") </script></head><body> </body></html>

3、点击文件再点击另存为

4、将.txt改成.html


5、编码选择UTF-8

6、保存。然后桌面多了一个html文件双击打开

7、这就是第一个JavaScript程序:hello world!
