首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

Repeater鼠标透过变色

2012-11-23 
Repeater鼠标经过变色script typetext/javascript? ? function fOver(obj){? ? ? ? cobj.style.back

Repeater鼠标经过变色

<script type="text/javascript">
? ? function fOver(obj){
? ? ? ? c=obj.style.backgroundColor;
? ? ? ? obj.style.backgroundColor="#CAD3E4";
? ? }
? ? function fOut(obj){
? ? ? ? obj.style.backgroundColor=c;
? ? }
</script>

<table>
? ? <tr>
? ? ? ? <td>用户编号</td>
? ? </tr>
? ? <asp:Repeater ID="rptUser" runat="server">
? ? <ItemTemplate>
? ? <tr style='background-color:<%#(Container.ItemIndex%2==0)?"red":"green"%>' onmouseover="fOver(this);" onmouseout="fOut(this);">
? ? ? ? <td><%#Eval("UID")%></td>
? ? </tr>
? ? </ItemTemplate>
? ? </asp:Repeater>
</table>

热点排行