<
body
>
<!-- 这里是其他的HTML标签 -->
<
script
> // 这里是代码 </
script
>
</
body
>
The benefits of this treatment is no need to worry because the page has not finished loading, resulting in less than a DOM node obtains the script error problem, and can avoid the problems caused by slow running script pages stuck. In addition, the front-end optimization guidelines Yahoo's had this one.
Original link:
https://zhidao.baidu.com/question/1447368474883103140.html