西西河

主题:ZT如何改进 Google +1 按钮的代码让它读取的更 -- meokey

共:💬1 新:
分页树展主题 · 全看
  • 家园 ZT如何改进 Google +1 按钮的代码让它读取的更

    如何改进 Google +1 按钮的代码让它读取的更快

    http://www.guao.hk/posts/better-embedding-code-for-google-1-buttons.html

    Aaron建议在Google改进之前,这么来写Google +1的代码还能快一点:

    <!-- Place this tag just before your close body tag -->

    <script>

    (function(d, t) {

    var g = d.createElement(t),

    s = d.getElementsByTagName(t)[0];

    g.async = true;

    g.src = 'https://apis.google.com/js/plusone.js';

    s.parentNode.insertBefore(g, s);

    })(document, 'script');

    </script>

    <!-- Place this tag where you want the +1 button to render -->

    <g:plusone></g:plusone>

分页树展主题 · 全看


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河