Javascript 使用iframe文档向我的标记添加类似Facebook的按钮无效
我尽我最大的努力使它工作,但我做不到 这就是我所做的Javascript 使用iframe文档向我的标记添加类似Facebook的按钮无效,javascript,html,fbml,xfbml,Javascript,Html,Fbml,Xfbml,我尽我最大的努力使它工作,但我做不到 这就是我所做的 按照上的说明操作 将iframe标记复制并粘贴到中的my test.html文件中 horiyang是facebook的名字 <!DOCTYPE HTML> <html> <body> <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Ffacebook.com%2Fhoriyahng%2F&width
中的my test.html文件中李>
<!DOCTYPE HTML>
<html>
<body>
<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Ffacebook.com%2Fhoriyahng%2F&width=200x200&layout=standard&action=like&show_faces=true&share=true&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200x200px; height:80px;" allowTransparency="true"></iframe>
</body>
</html>
请在
iframe
标记中的//之前添加https:
像这样
<iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Ffacebook.com%2Fhoriyahng%2F&width=200&layout=standard&action=like&show_faces=true&share=true&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:80px;" allowTransparency="true"></iframe>
这是你的盒子工作的小提琴链接,请检查它 能否在问题中添加test.html页面中的代码?是否从文件://加载测试页面?如果是这样,请尝试从服务器加载页面。我上载了它,您可以选中否,即保留初始页面的协议。请查看您的宽度元素值。。。这也显示了错误的值。。。检查这个