建议去hotmail看看,搂主有hotmail信箱吧:)

解决方案 »

  1.   

    <tr><td><input type=checkbox onclick="if(this.checked){ this.parentElement.parentElement.bgColor='red'} else {this.parentElement.parentElement.bgColor='#FFFFFF'}">简单的
      

  2.   

    <Script>
    function changeColor()
    {
    var o = event.srcElement;
    if(o.checked)
    o.parentElement.parentElement.style.backgroundColor="red";
    else
    o.parentElement.parentElement.style.backgroundColor="white";
    }
    </script>
    <table>
    <tr>
    <td>
    <input type="checkbox" onclick="changeColor()">
    this row this row this row
    </td>
    </tr>
    </table>
      

  3.   

    好像没有用,加入我初始话checkbox状态为checked,那点一下不会变色。我这里的效果是,改变初始状态,checkbox所在行变色,与初始状态一致,checkbox就恢复为初始颜色
      

  4.   

    //变通一下不就ok了~~
    //连我这不是搞网页开发的都知道~~<Script>
    function changeColor()
    {
    var o = event.srcElement;
    if(o.parentElement.parentElement.style.backgroundColor == "red")
    o.parentElement.parentElement.style.backgroundColor="white";
    else
    o.parentElement.parentElement.style.backgroundColor="red";
    }
    </script>
    <table>
    <tr>
    <td>
    <input type="checkbox" onclick="changeColor()" checked=true>
    this row this row this row
    </td>
    </tr>
    </table>