难住了。
我在index.php上有一个模态窗口,显示是否存在cookie,(当然我在chrome中使用dev,所以我可以在最后发现坏消息,哈哈)并且它有效很好,但Facebook“喜欢”代码根本不显示在ie或firefox ..它不是div(我可以在那里抛出静态文本,它显示,只是没有任何来自fb,html5,xfbml,iframe或甚至把一个网址添加到某个东西......)
有人有什么想法吗?
我当然很感激!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fb="http://ogp.me/ns/fb#">
<head>
<title>The Daily Adventures Of Mixerman | Welcome</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name) {
createCookie(name,"",-1);
}
</script>
<link href="styles/mixerman.css" rel="stylesheet" type="text/css">
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=265199713527696";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div id="fade">
<div id="overlay">
<div id="offame" onClick="document.getElementById('overlay').style.display='none';document.getElementById('fade').style.display='none'"></div>
<div id="facebookery">
<fb:like href="http://www.facebook.com/pages/Mixerman/8900341182" send="false" width="250" height="35" show_faces="false" font="arial"></fb:like>
</div>
</div>
</div>
<script>
var days = 30;
var advert = document.getElementById('fade');document.getElementById('facebookery');
if (readCookie('mixermanadvert')) {
advert.className = '';
} else {
advert.className = 'show';
createCookie('mixermanadvert', 'yes', days);
}
</script>
</body>
</html>
css的相关部分是:
#overlay {
display: block;
position: absolute;
left: 25%;
top: 25%;
width: 656px;
height: 380px;
z-index: 100;
background-image: url(../images/tendollarbook.png);
background-repeat: no-repeat;
background-position: center center;
}
#offame {
position: absolute;
display: block;
left: 571px;
top: 42px;
width: 55px;
height: 55px;
cursor: pointer;
}
#fade {
display: none;
position: absolute;
left: 0%;
top: 0%;
background-color: black;
-moz-opacity: 0.8;
opacity: .80;
filter: alpha(opacity=80);
width: 100%;
height: 100%;
z-index: 90;
}
#fade.show {
display: block;
}
#facebookery {
position: absolute;
left: 416px;
top: 202px;
width: 240px;
z-index: 150;
opacity: 1.0;
filter:alpha(opacity=100);
}
,浏览器一直是:
Chrome版本30.0.1599.69 m - 有效! Firefox 24(哈哈!) - 没有用! 互联网爆炸10 - 不,在那里也没有工作.. Safari - 有效!
..全部在Windows 7 Pro和最新的Apple OS ..
客户端可以跳过FB“赞”部分并且只是链接到FB,但此时,它让我充满了疯狂,我需要知道这里的答案..
YMMV ..