【问题标题】:google share pop window not opening when click点击时谷歌共享弹出窗口未打开
【发布时间】:2017-06-08 21:22:55
【问题描述】:

我使用的是谷歌分享按钮,但由于某种原因它没有打开弹出窗口,而是在同一窗口中全屏打开。

<a class="google-plus" style="display:inline-block" href="https://plus.google.com/share?url=http%3A%2F%2Ftarunkrishna.com%2F" title="Share on Google+">
  <span class="fa fa-google-plus"></span>
</a>

【问题讨论】:

标签: javascript web google-plus web-development-server


【解决方案1】:

您只有一个&lt;a&gt; 链接,这就是它们的工作方式。从 Google+ Share Link documentation 你应该包含一个 onclick 处理程序。完整的文档示例是:

<a href="https://plus.google.com/share?url={URL}" onclick="javascript:window.open(this.href,
  '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><img
  src="https://www.gstatic.com/images/icons/gplus-64.png" alt="Share on Google+"/></a>

【讨论】:

  • 先生,非常感谢您...我仍处于学习阶段..我以为我永远不会完成它。也很抱歉lste回复
猜你喜欢
  • 2021-07-22
  • 2013-04-08
  • 1970-01-01
  • 1970-01-01
  • 2020-06-03
  • 1970-01-01
  • 2016-07-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多