<TABLE height=115 cellSpacing=1 cellPadding=0 width=115 border=0>
<tr><td align="center">
<img src="img/1.gif" width="250" height="250" border="0" onmouseover="this.src='img/2.jpg';document.getElementById('xx').innerText = 'xxx';" onmouseout="this.src='img/1.gif'"></td></tr>
<tr><td id="xx">文字1</td></tr>
</table>

解决方案 »

  1.   

    <TABLE height=115 cellSpacing=1 cellPadding=0 width=115 border=0>
    <tr><td align="center">
    <img src="img/1.gif" width="250" height="250" border="0" onmouseover="this.src='img/2.jpg';document.getElementById('xx').innerText = '文字2';" onmouseout="this.src='img/1.gif';document.getElementById('xx').innerText = '文字1';"></td></tr>
    <tr><td id="xx">文字1</td></tr>
    </table>
      

  2.   

    对于静态的数据是没有问题.不过动态的就不行了.<TABLE height=115 cellSpacing=1 cellPadding=0 width=115    border=0>
     <tr><td align="center"><img   src="<%=rs("smallpic")%>"   name="Image1" width="250" height="250"   border="0" onmouseover="this.src='<%=rs("bigpic")%>';document.getElementById('xx').innerText = '<%=rs("title1")%>';"  onmouseout="this.src='<%=smallpic%>';document.getElementById('xx').innerText = '<%=rs("title2")%>'">那个xx变量的值不会随着id的改变而改变.

       </td>
                      </tr>
    <tr><td id="xx"><%=rs("title1")%></td></tr>
     
                  </table></td>
      

  3.   

    document.getElementById('<%=rs("key")%>').innerText = '<%=rs("title2")%>'
    <tr><td id="<%=rs("key")%>"><%=rs("title1")%></td></tr>
    其中<%=rs("key")%>对于每一张图片输出的值应该是不同的,建议使用数据行对应的ID或其他变量.
    保证每一对onmouseover取得的id与表格中的id值相同且在整个页面中唯一即可.