【发布时间】:2014-07-29 07:51:17
【问题描述】:
我在 Google plus 开发人员上创建了一个徽章:https://developers.google.com/+/web/badge/ 但是当我将代码复制并粘贴到我的 HTML 文件中时,徽章没有显示。这是我的代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Google + Badge</title>
</head>
<body>
<!-- Place this tag where you want the widget to render. -->
<div class="g-page" data-href="https://plus.google.com/109600806421917664383" data-rel="publisher"></div>
<!-- Place this tag after the last widget tag. -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</body>
</html>
我做错了什么!?谢谢
【问题讨论】:
-
发布的代码在Fiddle 中似乎运行良好,所以这可能不是问题所在,因此很难判断问题出在哪里,但这可能是您网站上的其他问题。
标签: javascript html google-plus