gplus按钮错误

时间:2011-12-05 13:59:00

标签: javascript google-plus-one

如果我在网页上放置简单的iframe

<iframe allowtransparency="true" frameborder="0" hspace="0" id="100513874119798249855" marginheight="0" marginwidth="0" name="I2_1321861433794" scrolling="no" src="https://plusone.google.com/_/+1/fastbutton?url=http%3A%2F%2Fwww.dudeye.com%2Fsite%2Flike%2F543&amp;size=tall&amp;count=true&amp;annotation=&amp;hl=en-US&amp;jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fwidget%2F__features__%2Frt%3Dj%2Fver%3DajMrQx3-U8Y.pl.%2Fsv%3D1%2Fam%3D!W_gXXLnZrrYgVlks%2Fd%3D1%2F#id=I2_1321861433794&amp;parent=http%3A%2F%2Fwww.dudeye.com&amp;rpctoken=295361220&amp;_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe" style="width: 50px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; height: 60px; position: static; left: 0px; top: 0px; visibility: visible; " tabindex="-1" vspace="0" width="100%" title="+1"></iframe>

如果不使用<g:plus>代码,我会遇到很多错误:

  

document.getElementById(a)为null

谷歌徽章中的一些错误,如不安全的JavaScript尝试使用URL访问框架... bla bla bla ...域,协议和端口必须匹配。

如何修复此错误及其发生的情况?

1 个答案:

答案 0 :(得分:0)

您需要在您的父网页上加入google +1 javascript才能使其正常运作。