asp.net listview highlight row on click

后端 未结 1 1318
予麋鹿
予麋鹿 2021-01-26 14:29

I know how to set up listview to highlight a row when you click a link, image, etc but I am just wondering if it is possible to set it up to highlight a row when you click on an

相关标签:
1条回答
  • 2021-01-26 15:03

    You could use Jquery on the client side:

    $("#myTable tr").click( function () 
    {
       $("#myTable tr").each(function () { $(this).removeClass("selected")}); 
       $(this).addClass("selected"); 
    });​
    

    An example fiddle:

    http://jsfiddle.net/9pmcA/26/

    0 讨论(0)
提交回复
热议问题