【问题标题】:How to get Google plus share in popup like Twitter?如何在 Twitter 等弹出窗口中获得 Google plus 分享?
【发布时间】:2012-05-10 10:57:56
【问题描述】:

Google+ 图标会自动在 HOVER 上分享页面,并且不需要像其他图标那样点击。有什么办法可以解决这个问题,需要像其他人一样点击 [fb,twitter] 并像 Twitter 共享图标一样加载弹出窗口?

【问题讨论】:

    标签: google-plus google-plus-one


    【解决方案1】:

    JavaScript window.open 方法将打开一个新窗口。您可以将此技术与share link 结合使用来实现您的目标。这是从official docs 中提取的这种技术的示例。只需将您的目标网址替换为http://example.com

    <a href="https://plus.google.com/share?url=http://example.com"
      onclick="javascript:window.open('http://example.com','',
      '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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-01-14
      • 2011-09-14
      • 2014-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-04
      相关资源
      最近更新 更多