码迷,mamicode.com
首页 > Web开发 > 详细

html当中如何引用js文件

时间:2019-10-06 13:41:32      阅读:114      评论:0      收藏:0      [点我收藏+]

标签:art   fir   data   efi   save   var   notepad   can   win   

 

3)html当中如何引用js文件

如果需要javascript工程师和html美工各干各的工作,需要分开写文件。

例 1.2


<html>
<head>
    <script src="Hello.js"></script>
    <title></title>
</head>
<body>
</body>
</html>



Hello.js(如果你用notepad建立一个txt之后你再改为js,一定在存时,要存成utf-8或unicode格式):

    var a ;
    /*before you set value, a‘ type can not be defined.*/
    document.writeln(typeof(a) + "<br>他们");
    a = true;
    document.writeln(typeof(a) + "<br>");
    /*下面的console.log只有安装了firebug的firebox不报错*/
    console.log("This is the 1 message 马克-to-win write in %s", a);
    document.writeln(a);

文章转载自原文:https://blog.csdn.net/qq_44594249/article/details/98882787

html当中如何引用js文件

标签:art   fir   data   efi   save   var   notepad   can   win   

原文地址:https://www.cnblogs.com/renzhe111/p/11626808.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!