<table width=480 bgcolor=ffffff>
<tr>
<td onclick='this.parentElement.parentElement.style.background="ffee00"'>
单击</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr></table>

解决方案 »

  1.   

    放上一张图片,
    然后使用OnClick事件。太久没理会过网页编程了。
    都不会了。
    :(
      

  2.   

    我要写个函数,使用onclick来触发,
    主要目的就是单击<td>变色,说明为选中,如果再单击别的,另外一个<td>就要变回原来的颜色。
      

  3.   

    <table width=480 bgcolor=ffffff>
    <tr>
    <td bgcolor="dddddd" onclick="javascript:if(this.style.background=='#ffee00') this.style.background='#dddddd'; else this.style.background='#ffee00'">
      

  4.   

    如果要接这单击另外一个<td>哪它们的颜色不就一样了!!!????
      

  5.   

    你的意思是实现这样的效果吧?
    <table border=1 width=400 align=center>
      <tr align=center>
        <td onfocus="this.style.backgroundColor='#6699cc'" onblur="this.style.backgroundColor=''">This</td>
        <td onfocus="this.style.backgroundColor='#6699cc'" onblur="this.style.backgroundColor=''">That</td>
      </tr>
    </table>不知道我理解的对不对?