运行js代码的两种方式

来源:互联网 发布:淘宝假羽绒被 编辑:程序博客网 时间:2024/05/16 12:42

一、直接在head中插入js代码

<head>    <script>    alert ("hello js");    </script></head>

二、在js文件中编写代码,并引用该文件

<head>    <script src="..."></script></head>
原创粉丝点击