Tôi có nút google + được trả lại trên trang web của tôi như sau:Google Plus One Button - Cách thêm cuộc gọi lại?
Trong 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);
Trong html:
<g:plusone size="medium" href="https://site.com"></g:plusone>
Làm thế nào tôi có thể thêm một callback để này để phát hiện khi người dùng đã nhấp vào? Tôi thấy các tài liệu ở đây: https://developers.google.com/+/plugins/+1button/#jsapi không thấy cách triển khai với kết xuất hiện tại. Cảm ơn
Bạn có nhận thấy thuộc tính "gọi lại" của đối tượng tham số không? Tôi nghĩ đó là những gì bạn muốn. – Pointy
@Pointy nơi sẽ được thêm vào? – AnApprentice
Bạn đặt nó trong thẻ: '' –
Pointy