如何在Google Plus徽章的新窗口中打开链接? [英] How to open the link in new window of Google Plus Badge?

查看:128
本文介绍了如何在Google Plus徽章的新窗口中打开链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站上有 Google Plus徽章 Google +1按钮
我需要在新窗口中打开指向Google+页面(由徽章生成)的链接.

如果您还有其他方法,我需要:

I have in my website the code of Google Plus Badge and Google +1 Button
I need that the link to Google+ page (generate by Badge) open in new Window.

If you have other way, I need:

  • 链接到Google+页面.
  • 添加用于添加到圈子的功能.
  • +1带有计数的按钮.

全部排成一行.

我的代码如下:

<table>
<tr>
<td style="padding-top:2px; vertical-align:top;"><div style="width:180px; height:30px;     overflow:hidden;">
<div style="margin-top:-15px; margin-left:0px;" title="International Studies Google         Plus">
                <style type="text/css">
                             #___plusone_0, #___plusone_0         iframe{
                                 width:66px !important;
                             }
                            </style>
                <div class="g-plus" data-href="https://plus.google.com/118182458881247471225?rel=publisher" data-width="170" data-height="69" data-theme="light"></div>
              </div>
            </div></td>
              <td style="padding-top:6px; padding-left:5px;"><g:plusone></g:plusone>    </td>
</tr>
</table>

推荐答案

您不能这样做.

徽章不提供任何允许您在新窗口中打开链接的标志.这也是提供您所需的添加到圈子"功能的唯一功能.

The badge does not provide any flag that allows you to open the link in a new window. It's also the only feature that provides the 'Add to circles' functionality that you require.

您能获得的最接近的结果是使用静态徽章和+1按钮:

The closest that you can get would be to use a static badge and a +1 button:

<div>
  <a href="https://plus.google.com/118182458881247471225?prsrc=3" rel="publisher" style="text-decoration:none;" target="_blank">
  <img src="//ssl.gstatic.com/images/icons/gplus-32.png" alt="Google+" style="border:0;width:32px;height:32px;"/></a>

  <div class="g-plusone" data-annotation="inline" data-width="300"></div>
</div>

另外,似乎还有一个功能请求以获得此功能.如果您为该功能请求加注星标,则会收到有关更新的通知.

Also, it looks like there's a feature request for this functionality. If you star this feature request, you'll be notified about updates.

这篇关于如何在Google Plus徽章的新窗口中打开链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆