<!--简单的例子-->
<table>
  <tr style="background-color: #CCFFFF" onclick="this.style.backgroundColor='#FFECFC'">
    <td><a href="#">自己1</a></td>
    <td><a href="#">自己2</a></td>
  </tr>
</table>

解决方案 »

  1.   

    <table border=1 width=20%>
    <tr onclick='this.bgColor="#336699"' width=20%>
       <td><a href="#">111111</a></td>
    </tr>
    </table>
      

  2.   

    我的链接要连到别的页面(帧结构的右边),上面说的是帧结构的左页面最好是放在链接的onclick事件中
      

  3.   

    left.htm:
    <table border=1 width=20%>
    <tr onclick='this.bgColor="#336699"' width=20%>
       <td><a href="http://www.163.com" target=frm2>111111</a></td>
    </tr>
    </table>
    ////////////////////////////////
    right.htm:
    <html>
    <head>
    </head>
    <body>
    This is right.htm
    </body>
    </html>
    //////////////////////////////////
    main.htm:
    <frameset cols="20%,*">
    <frame src="left.htm"></frame>
    <frame src="right.htm"  name="frm2"></frame>
    </frameset>
      

  4.   

    to  wssgwps(小刀会) :
    你的方法可以的!如果有很多行的话,怎么能让点击的行变背景色为指定颜色,其他行的背景色变没或透明?
    如果麻烦的话,直接告诉我在javascript里怎么得到每行,这样我就可以设置它的属性了:)
      

  5.   

    <!--总算明白你的目的了, 再给你一个例程吧-->
    <script language="JavaScript">
    function doBackC(id)
    {
    var i,o;
    for (i=1;i<=3;i++)
    {
    o=document.getElementById('trid'+i);
    if (i==id)
    {
    o.style.backgroundColor='#FFECFC';
    }
    else
    {
    o.style.backgroundColor='';
    }
    }
    }
    </script>
    <iframe name="if_frm" width="100%" height="320" src="about:blank"></iframe>
    <table align="center" width="45%" border="1" bgcolor="#FFFFE8">
      <tr id="trid1">
        <td><a href="http://www.pal.org.cn" target="if_frm" onclick="doBackC(1)">中国仙剑联盟</a></td>
      </tr>
      <tr id="trid2">
        <td align="center"><a href="http://paltv.126.com" target="if_frm" onclick="doBackC(2)">仙剑TV网</a></td>
      </tr>
      <tr id="trid3">
        <td align="right"><a href="http://palhero.126.com" target="if_frm" onclick="doBackC(3)">仙剑奇侠传英雄网</a></td>
      </tr>
    </table>