这些都一样吗? ASYNC Javascript

时间:2015-09-13 19:36:52

标签: javascript performance asynchronous

<script type="text/javascript">
  (function() {
    var po = document.createElement("script"); po.type = "text/javascript"; po.async = true;
    po.src = "https://apis.google.com/js/plusone.js?publisherid=112917099095075652323";
    var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

<script async src="https://apis.google.com/js/plusone.js?publisherid=112917099095075652323"></script>

我想开始将从第三方加载的脚本切换到后一种语法。好奇,好像甚至需要type属性。希望异步加载所有这些脚本。想法?

0 个答案:

没有答案