<asp:DataList ID="DataList1" Width="100%" runat="server">
<ItemTemplate>
<table style="100%; background-color:#ffffff; border-bottom: #ffcc66 2px solid;" cellspacing="0">
<tr>
<td colspan="2">
</td>
</tr>
</table>
</ItemTemplate>
<AlternatingItemTemplate>
<table style="100%; background-color:#000000; border-bottom: #ffcc66 2px solid;" cellspacing="0">
<tr>
<td colspan="2">
</td>
</tr>
</table>
</AlternatingItemTemplate>
</asp:DataList>
这样是隔行显示黑白色,其中
<AlternatingItemTemplate>
就是设置隔行显示的模式
dlHTList是dataset的id
$("#dlHTList").live("mouseover",function(e){
$(e.target).parent().addClass("activeRow");
return false;
}).live("mouseout", function(e) {
$(e.target).parent().removeClass("activeRow");
return false;
});
css伪类简单高亮 等同上边的代码
/*高亮*/
#dlHTList tr:hover /*dlHTList-->dataset的id*/
{
background-color:RGB(184,204,228);
}
dataset 相当于 <table>
ItemTemplate 相当于<tr>