【问题标题】:Google +1 button as a link?Google +1 按钮作为链接?
【发布时间】:2011-09-30 18:35:16
【问题描述】:

您可以将 Google +1 按钮作为简单链接吗?

喜欢

<a href="http://google.com/+1/url=http://mysite.com" class="google-plus1">
  + 1
</a>

我不喜欢 iframe

【问题讨论】:

标签: css button hyperlink social-networking


【解决方案1】:

为避免 iframe,您可以使用以下方法: +1 your website

+1 代码http://www.example.com

<!-- 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>

<!-- Place this tag where you want the +1 button to render -->
<g:plusone href="http://www.example.com"></g:plusone>

【讨论】:

  • 我更喜欢在用户点击按钮之前不需要从谷歌加载任何数据的解决方案。有点像“转到此处为我的网站 +1”链接。有隐私原因不能像这样嵌入 pulsone API。在某些司法管辖区,它甚至可能是非法的。
猜你喜欢
  • 1970-01-01
  • 2011-10-04
  • 2011-10-16
  • 1970-01-01
  • 2012-12-11
  • 2020-11-25
  • 1970-01-01
  • 2012-08-23
  • 2016-05-22
相关资源
最近更新 更多