当用户单击“g+”按钮时,我想在页面上添加一条警报消息。我怎样才能做到这一点?
这是代码:
<g:plusone href="http://test.com//" annotation="inline" width="300"></g:plusone>
<script type="text/javascript">
(function() {
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);
})();
</script>