读书人

asp.net简单有关问题

发布时间: 2013-08-11 22:22:29 作者: rapoo

asp.net简单问题
在.aspx中代码如下:


<ItemTemplate>
<table class="hsdContent" style="width:100%;" >
<tr class="OldLine" onmouseover="style.background-color:'#C86F70'">
<td style="width:10%;"><%#Eval("HSDID") %></td>
<td style="width:60%;text-align:left;"><%#Eval("Title") %></td>
<td style="width:10%;"><%#Eval("Status") %></td>
<td style="width:10%;"><asp:ImageButton ID="Index_Reproduce" runat="server" ImageUrl="image/ReproduceButton.jpg" OnClick="Reproduce_Click"/></td>
<td style="width:10%;"><asp:ImageButton ID="Index_Submit" runat="server" ImageUrl="image/SubmitButton.jpg" CommandName="Edit" CommandArgument='<%#Eval("id")+","+Eval("HSDID")%>' OnClick="Edit_Click" /></td>
</tr>
</table>
</ItemTemplate>

我想要是的当出表移动到该行时,改变这行的背景色。写法如上为什么不可行呢?请帮帮忙 谢谢!
我用响应事件做 试了下,在.aspx.cs中不响应对应函数。
[解决办法]
onmouseover="这里是js函数"
[解决办法]
like these:
http://www.cnblogs.com/insus/archive/2011/06/25/2090071.html



http://www.cnblogs.com/insus/p/3214497.html

http://www.cnblogs.com/insus/archive/2012/10/29/2744769.html

asp.net简单有关问题
[解决办法]
onmouseover="javascript:style.backgroundColor='#C86F70'"
[解决办法]


onmouseover="this.style.backgroundColor='#C86F70'"


这样就可以了

读书人网 >asp.net

热点推荐