2017-01-24 65 views
0

我使用谷歌分享按鈕,但由於某種原因,它不會打開一個彈出窗口,而是在同一個窗口中全屏打開它。谷歌分享彈出窗口不點擊時打開

<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> 
+0

的[在一個彈出谷歌加分享]可能的複製(http://stackoverflow.com/questions/9022416/google-plus-share-in-a-popup) – jakubbialkowski

回答

0

您只有一個<a>鏈接,這是他們的工作方式。從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> 
+0

先生非常感謝你...我仍然處於學習階段..我想我永遠不會完成它。也對LST回覆感到抱歉 –

相關問題