如何引入JavaScript代码的方式


1. 在一对script标记中写代码

         Document              alert('你好!');        2. 在html的行内编写代码(这种方式不建议使用)            Document                   alert('你好!');        3. 用script标签以及src属性引入指定js文件   建立一个js文件,内容:   alert('今天天气很好');   html文件:            Document                   alert('你好!');