2013-05-28 73 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 –