try<table ondblclick="event.srcElement.parentNode.style.color='red';">
<tr><td>hello</td><td>hello</td></tr>
<tr><td>hello</td><td>hello</td></tr>
<tr><td>hello</td><td>hello</td></tr>
<tr><td>hello</td><td>hello</td></tr>
<tr><td>hello</td><td>hello</td></tr>
<tr><td>hello</td><td>hello</td></tr>
</table>depending on your table strcuture, you might need to tweak the script

解决方案 »

  1.   

    <table border=1 ondblclick="event.srcElement.parentNode.style.color='red';">
    <%for i=0 to 10%>
    <tr><td><font color="#32cd32">ddd</font></td></tr>
    <%next%></table>
    to:思归大侠,不行呀!
      

  2.   

    try<table ondblclick="doClick()">
    <tr><td>hello</td><td>hello</td></tr>
    <tr><td>hello</td><td>hello</td></tr>
    <tr><td>hello</td><td>hello</td></tr>
    <tr><td>hello</td><td>hello</td></tr>
    <tr><td>hello</td><td>hello</td></tr>
    <tr><td>hello</td><td>hello</td></tr>
    <tr><td><font color="#32cd32">ddd</font></td></tr>
    </table>
    <script language="javascript">
    var row=null;
    function doClick()
    {
      if (row != null)
      {
    //if you want to keep the color, comment out the following two lines
       row.style.color='';
    doChildren(row, '');
      }
      var e = event.srcElement;
      while (e != null && e.tagName != "TR" && e.tagName != "BODY")
       e = e.parentElement;  if (e != null && e.tagName == "TR")
      {
        row = e;
        row.style.color='red';
        doChildren(row, 'red');
      } 
    }function doChildren(obj, color)
    {
      for (var i=0; i < obj.all.length; i++)
      {
    obj.all[i].style.color = color
      }
    }
    </script>
      

  3.   

    <table border=1 
    <%for i=0 to 10%>
    <tr ondblclick="this.style.color='red';">><td>ddd</td></tr>
    <%next%></table>