本帖最后由 dydxf 于 2010-03-04 12:26:58 编辑

解决方案 »

  1.   

    <tr onclick="javascript:window.location.href='test.asp'"><td>asd</td></tr>
      

  2.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <base href="http://docs.jquery.com" />
    <script src="http://code.jquery.com/jquery-latest.js"></script>
     
    <script>
    window.onload = (function(){
       $(".tablesorter tbody tr").toggle(
          function (){
               $(this).addClass("clickColor")  
          },
          function (){
               $(this).removeClass("clickColor")   
          }
        );
        $(".tablesorter tbody tr td a").each(function(){
            $(this).click(function(){
                document.location.href=this.href;
            });
        });
    });</script>
    <style> 
     
      .clickColor { background:yellow; }
      
    </style>
    <style>html,body{border:0; margin:0; padding:0;}</style></head>
    <body>
    <table class="tablesorter">
    <tr><td>1</td><td><a href="11">1111</a></td></tr>
    <tr><td>2</td><td><a href="22">2222</a></td></tr>
    <tr><td>3</td><td><a href="33">3333</a></td></tr>
    </table>
    </body>
    </html>