3
的onmouseover手形图标我有一个GridView:没有显示
<asp:GridView ID="gvwProd" runat="server" CssClass="gridview" ShowHeaderWhenEmpty="true"
AllowPaging="true" BackColor="ButtonFace" OnRowDataBound="gvwProd_OnRowDataBound"
OnRowCreated="gvwProd_RowCreated" OnSorting="gvw_OnSorting" AllowSorting="true"
AutoGenerateColumns="false" ShowFooter="false">
我想设置一个手悬停图标上每行一个特定的细胞:
protected void gvwProd_OnRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[2].Attributes.Add("onmouseover", "document.body.style.cursor='hand'");
e.Row.Cells[2].Attributes.Add("onmouseout", "document.body.style.cursor='auto'");
}
}
的onmousover和onmouseout事件出现在标记中:
<td onmouseover="document.body.style.cursor='hand'" onmouseout="document.body.style.cursor='auto'" style="white-space:nowrap;">05-07-2012</td>
但是,没有可见的手迹,也没有看到发生任何事情。我究竟做错了什么?使用IE 8
工作完美! – Ted 2012-07-27 17:46:21