各位,帮我看看代码。。多谢了!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>主页</title>
<style type="text/css">
body{
margin:0px;
text-align:center;
}
.d{
margin-top:5px;
}
</style>
<script language="javascript" type="text/javascript">
function changecor(c)
{
for (var i=1;i<=6;i++)
{
if (i==c)
var a=document.getElementById("t"+c).getElementsByTagName("img");
a[0].src="img/M2.jpg";
document.getElementById("d"+c).style.display="block";
else
var b=document.getElementById("t"+i).getElementsByTagName("img");
b[0].src="img/M1.jpg";
document.getElementById("d"+i).style.display="none";
}
}
</script>
</head>
<body>
<div class="d">
<table width="900" border="0" cellspacing="0" cellpadding="0" >
<tr >
<td width="130" id="t1"><img src="img/M1.jpg" width="130" height="30" onmouseover="changecor(1)"/></td>
<td width="24"> </td>
<td width="130" id="t2"> <img src="img/M1.jpg" width="130" height="30" onmouseover="changecor(2)" /> </td>
<td width="24"> </td>
<td width="130" id="t3"> <img src="img/M1.jpg" width="130" height="30" onmouseover="changecor(3)"/> </td>
<td width="24" > </td>
<td width="130" id="t4"> <img src="img/M1.jpg" width="130" height="30" onmouseover="changecor(4)"/> </td>
<td width="24"> </td>
<td width="130" id="t5"> <img src="img/M1.jpg" width="130" height="30" onmouseover="changecor(5)"/> </td>
<td width="24"> </td>
<td width="130" id="t6"> <img src="img/M1.jpg" width="130" height="30" onmouseover="changecor(6)"/> </td>
</tr>
<tr >
<td height="200" colspan="23" valign="top">
<div id="d1" style="display:block">
测试下1 </div>
<div id="d2" style="display:none">
测试下2 </div>
<div id="d3" style="display:none">
测试下3 </div>
<div id="d4" style="display:none">
测试下4 </div>
<div id="d5" style="display:none">
测试下5 </div>
<div id="d6" style="display:none">
测试下6 </div>
</td>
</tr>
</table>
</div>
</body>
</html>
到底哪里出错了??各位帮帮忙