2013-05-28 144 views
-3

我在网站上嵌入了下面的代码(html,javascript,css),虽然它在firefox和chrome的任何版本(-many-last)都能正常工作,但它不能正常工作在Internet Explorer 9或更旧。Internet Explorer兼容性

通过不正常工作我的意思是说,链接不工作(没有导航)。对不起,我还不够清楚... 是否有任何错误或从我的代码丢失?我能添加一些东西吗? 我试图添加中间标记

<meta http-equiv="X-UA-Compatible" content="IE=edge" /> 

但什么也没有发生。

我的代码是:

<!DOCTYPE html> 
<html> 
<head> 
<style> 
body{font-family:verdana; font-size:25px} 
table{font-size:80%;background:181919} 
a{color:white;text-decoration:none;font:bold } 
a:hover{color:#009ED8} 
td.menu{background:#181919} 
table.menu 
{ 

font-size:100%; 
position:absolute; 
visibility:hidden; 
} 
</style> 
<script> 
function showmenu(elmnt) 
{ 
document.getElementById(elmnt).style.visibility="visible"; 
} 
function hidemenu(elmnt) 
{ 
document.getElementById(elmnt).style.visibility="hidden"; 
} 
</script> 
</head> 

<body> 

<table width="100%" border = 0> 
<tr bgcolor="181919" > 
    <td onmouseover="showmenu('home')" onmouseout="hidemenu('home')" width="15%"> 
    <a href="http://www.test.com" target=_top>Αρχική</a><br> 

    </td> 

<td onmouseover="showmenu('company')" onmouseout="hidemenu('company')" width="25%"> 
    <a href=" http://www.test.com" target=_top>Η εταιρία μας</a><br> 
    </td> 
    <td onmouseover="showmenu('properties')" onmouseout="hidemenu('properties')" width="20%"> 
    <a href=" http://www.test.com" target=_top>Ακίνητα</a><br> 
    <table class="menu" id="properties" width="120"> 
<tr><td><br></td></tr> 
    <tr><td class="menu"><a href=" http://www.test.com" target=_top>Πώληση</a></td></tr> 
    <tr><td class="menu"><a href=" http://www.test.com" target=_top>Ενοικίαση</a></td></tr> 
    <tr><td class="menu"><a href=" http://www.test.com" target=_top>Μισθωμένα</a></td></tr> 
    <tr><td class="menu"><a href="http://www.test.com" target=_top>Υπό κατασκευή</a></td></tr> 

    </table> 
    </td> 
    <td onmouseover="showmenu('contact')" onmouseout="hidemenu('contact')" width="20%"> 
    <a href=" http://www.test.com" target=_top>Επικοινωνία</a><br> 
    <table class="menu" id="contact" width="120"> 


    </table> 
</td> 
    <td onmouseover="showmenu('press')" onmouseout="hidemenu('press')" width="20%"> 
<a href=" http://www.test.com" target=_top>Γραφείο Τύπου</a><br> 
    <table class="menu" id="press" width="120"> 
<tr><td><br></td></tr> 
    <tr><td class="menu"><a href="http://www.test.com" target=_top>Ανακοινώσεις</a></td></tr> 
    <tr><td class="menu"><a href=" http://www.test.com" target=_top>Οικονομικά Στοιχεία</a></td></tr> 


    </table> 
    </td> 

</tr> 
</table> 
</body> 

</html> 
+4

你究竟是什么意思,“不工作”?不工作*如何*?控制台中是否有错误? – Pointy

+4

你是什么意思,工作不正常?你在控制台遇到什么错误? – Renan

+0

_“工作不正常”_ - 请正确解释您的意思。也就是说,添加对所需行为和实际行为的解释。 (顺便说一句,您试图展示和隐藏的“家庭”和“公司”元素在哪里?其他鼠标悬停有相应的元素,但不适用于这两种元素。) – nnnnnn

回答

0

IE9以上的老年人不完全支持最新的HTML5标签。最好为html5使用chrome。

+0

IE8更糟糕,但有js插件那里给他们的兼容性,如html5shiv –