相关疑难解决方法(0)

Google Plus一键 - 如何添加回调?

我在我的网站上呈现了谷歌+按钮,如下所示:

在JS中:

    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
Run Code Online (Sandbox Code Playgroud)

在html中:

<g:plusone size="medium" href="https://site.com"></g:plusone>
Run Code Online (Sandbox Code Playgroud)

如何为此添加回调以检测用户何时单击?我在这里看到了文档:https://developers.google.com/+/plugins/+1button/#jsapi没有看到如何使用当前渲染实现.谢谢

javascript api jquery google-plus

9
推荐指数
1
解决办法
6999
查看次数

标签 统计

api ×1

google-plus ×1

javascript ×1

jquery ×1