|
藍森林 http://www.lslnet.com 2006年8月25日 8:28
求教!!求救!!Help Me!
各位請看我下面的代碼出錯在什麼地方?目的是鼠標移到單元格,此單元格就變成立體表格,移開鼠標又回復原狀。
<table width="400" height="20" border="0" cellpadding="0" cellspacing="0" bgcolor="#99cccc">
<tr>
<td width="80" height="20"
onMouseOver="this.classname='table1'"
onMouseOut="this.classname='table2'"
class="table2">
<div align="center"><a href="#"><strong><font color="#9900CC" size="2">表格1</font></strong></a></div></td>
<td width="80" height="20"><div align="center"><a href="#"><strong><font color="#9900CC" size="2">標格2</font></strong></a></div></td>
<td width="80" height="20"><div align="center"><a href="#"><strong><font color="#9900CC" size="2">表格3</font></strong></a></div></td>
<td width="80" height="20"><div align="center"><a href="#"><strong><font color="#9900CC" size="2">表格4</font></strong></a></div></td>
<td width="80" height="20"> <div align="center"><a href="#"><strong><font color="#9900CC" size="2">表格5</font></strong></a></div></td>
</tr>
</table>
其中TABLE1。TABLE2定義如下:
<style type="text/css">
<!--
.table1 {
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #FFFFFF;
border-right-color: #000000;
border-bottom-color: #000000;
border-left-color: #FFFFFF;
}
.table2 {
border: 1px solid #99CCCC;
}
</style>
|
onMouseOver="this.classname='table1'"
onMouseOut="this.classname='table2'"
------------------------
其中classname改成lassName,N大寫。
|
jixiaoan在上個帖子中說
非常感謝,改了後就OK了,沒想到是字母大小寫的原因啊~ :o |
Javascript是區分大小寫(case sensitive)的,這點我覺得很討厭。 |
|