【发布时间】:2011-07-18 11:48:59
【问题描述】:
我正在尝试将 Google +1 按钮添加到我的网站。
我已按照此处的说明进行操作: http://www.google.com/intl/en/webmasters/+1/button/index.html
这是我网页的代码:
<html>
<head>
<title>
Why won't it appear?
</title>
<!-- Place this tag in your head or just before your close body tag -->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
</head>
<body>
<h1>
Example title
</h1>
<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="tall" href="http://www.example.com/"></g:plusone>
</body>
</html>
如您所见,我完全按照他们的指示进行操作,但它并没有出现。我已经在 Chrome、Firefox 和 IE8(都在 Windows XP 上)上尝试过。我只是从本地系统打开网页。
有趣的是,我可以看到它在这里工作 http://www.satinbow.co.uk/xxtest.html
谁能解开这个谜?
更新/线索
当页面本地存储在我的系统上时,它不起作用(硬刷新也没有解决它。)
但我已将页面放在这里:dl.dropbox.com/u/6920023/test2.html,它似乎在那里工作。
知道发生了什么真是太酷了:)
【问题讨论】:
-
您的代码在 FF5 Win 7 上运行良好。它在 IE7 上无法运行 jsfiddle.net/vBPfx 我们可以访问该页面吗?网址?
-
@ysrb 有趣的是,该链接在页面无法使用的 3 个浏览器上对我有效,这使它更加神秘。
-
尝试硬刷新它。如果您能提供一个我们可以查看的 URL,那就太好了!
-
当页面本地存储在我的系统上时,它不起作用(硬刷新也没有修复它。)但是我把页面放在这里:dl.dropbox.com/u/6920023/test2.html 现在看来去工作。我真的很想知道现在发生了什么:)
标签: google-plus-one