我一直在尝试将 Google 的 +1 按钮放在我的网站上,但它不符合 W3C 标准。
以下是代码:
<!-- Place this tag in your head or just before your close body tag -->
<script type="text/javascript" src="http://apis.google.com/js/plusone.js">
{lang: 'en-GB'}
</script>
<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="medium" href="http://www.example.org"></g:plusone>
有人知道为什么会发生这种情况,以及如何使其符合要求吗?谢谢
修改:为了通过验证,我在我的网站上写了一篇文章。
{lang: 'en-GB'}
这部分对我来说看起来很奇怪。首先,因为相同的脚本标签正在从src
加载,所以我认为它不应该再有任何代码了。其次,这个对象字面量没有被分配给任何东西,那么它的意义是什么呢? - mkilmanas