javaScript被引入的方式

xiaoxiao2021-02-27  165

javaScript有三种引入方式:

       1. <!--内部脚本-->放在head中

       <Script type="text/javaScript">         alert('xxx');        </Script>

       2.  <!--外部脚本-->             <!--首先创建一个js,然后在html中引入-->          <Script type="text/javaScript" src="demo.js">  </Script>  

       3. <!--内嵌脚本-->放在body中

           <input type="button" value="button" οnclick="alert('xxx')"/>

       

转载请注明原文地址: https://www.6miu.com/read-16632.html

最新回复(0)