首页 > Web开发 > 详细

html当中如何引用js文件

时间:2020-12-28 18:07:51      阅读:22      评论:0      收藏:0      [点我收藏+]

 

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文件

原文:https://www.cnblogs.com/shituxingzhe1949/p/14202522.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!