首页 > 代码库 > 延迟加载JS

延迟加载JS

技术分享

Labjs库解决异步加载的兼容性问题

<script src="http://www.mamicode.com/a.js" defer="defer"></script>
<script src="http://www.mamicode.com/b.js" defer="defer"></script>
<script src="http://www.mamicode.com/c.js" defer="defer"></script>
<script src="http://www.mamicode.com/a.js" async="async"></script>
<script src="http://www.mamicode.com/b.js" async="async"></script>
<script src="http://www.mamicode.com/c.js" async="async"></script>

 

延迟加载JS