相关疑难解决方法(0)

将JavaScript放在HTML文件中的哪个位置?

假设我有一个相当庞大的JavaScript文件,打包到大约100kb左右.通过文件我的意思是它是一个外部文件,将在via中链接<script src="...">,而不是粘贴到HTML本身.

哪个是放在HTML中的最佳位置?

<html>
<head>
    <!-- here? -->
    <link rel="stylesheet" href="stylez.css" type="text/css" />
    <!-- here? -->
</head>
<body>
    <!-- here? -->
    <p>All the page content ...</p>
    <!-- or here? -->
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

每个选项之间是否存在功能差异?

html javascript optimization

202
推荐指数
3
解决办法
12万
查看次数

标签 统计

html ×1

javascript ×1

optimization ×1