function OnSelectTableRow(o){
o.setAttritube("class","dkfjkdjnfkdfjdkjfk");
}

解决方案 »

  1.   

    function OnSelectTableRow(obj)
    {
       obj.className = "TableSelectedRow" ;
    }
      

  2.   

    <html>
    <head>
    <title></title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    <style type="text/css">
     .pko {background-color:#66ccff}
    .TableItemRow {font-size:9pt;font-style:italic}
    </style>
    <script language="javascript">
    function OnSelectTableRow(pk){
    pk.className='pko';}
    </script>
    </head>
    <body>
    <table id="myTable" border="1" style="WIDTH: 280px; HEIGHT: 67px">
    <tr bgcolor="#eeeeee" class="TableItemRow" onclick="OnSelectTableRow(this)">
    <td>djk</td>
    </tr>
    <tr bgcolor="#eeeeee" class="TableItemRow" onclick="OnSelectTableRow(this)">
    <td>djk</td>
    </tr>
    <tr bgcolor="#eeeeee" class="TableItemRow" onclick="OnSelectTableRow(this)">
    <td>djk</td>
    </tr>
    </table>
    </body>
    </html>