JavaScript引用方法说明

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js</title>
</head>
<body>



    <!--js一般放在body最底端,防止js加载不出来时页面卡住-->
    <!--引用外部js-->
    <script src="js/common.js"></script>
    <!--html页面内部定义js-->
    <script type="text/javascript">
        alert('ha')
    </script>
</body>
</html>
原文地址:https://www.cnblogs.com/MacoLee/p/5888710.html