1
我对编码比较陌生,但我已经构建了一个网站:RateMyTeam.co.uk(幻想足球分析),并且遇到与Internet Explorer兼容性问题的一些问题。该网站在Chrome和Safari中完美运行,并且只有Firefox中出现问题。但IE的问题是一个问题,因为超过30%的访问者使用IE。在Internet Explorer中切换可见性问题
在主页上,我使用javascript函数切换可以看到的问题的可见性,例如“什么是我的FPL ID?”
在Chrome中,它做我想做的事情,当您将鼠标悬停在它上面并且能够点击它并显示问题的答案时,它会改变颜色。
有没有人有任何想法是什么是我的主页代码是防止可见性切换在IE浏览器的错误?我已经通过众多论坛寻找答案,并尝试了很多东西,但它似乎并没有工作! :■
感谢,
克里斯
编辑
这里是代码:
HTML位:
<h5 style="text-shadow: #111 2px 2px 4px"><a2 href="#" onclick="toggleVisibility('foo6');">*WHAT IS MY FPL PLAYER ID?</a2></h5>
<div id="foo6" style="display:none;"><h6 style="margin-top:8px;margin-bottom:13px;color:#ccc">Each person who plays the fantasy football game at <a href="http://www.fantasy.premierleague.com">www.fantasy.premierleague.com</a> gets assigned a unique id. This is a number which can be as small as 1 digit and as big as 7 digits long.</h6></div>
的JavaScript位:
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/JavaScript">
function toggleVisibility(id) {
var e = document.getElementById(id);
if(e != null) {
if(e.style.display == 'none') {
e.style.display = 'block';
} else {
e.style.display = 'none';
}
}
}
</script>
你有任何代码可以告诉我们吗? – Colin
对不起应该添加代码。我编辑了以前的消息。 – Chris
什么是
Toto