Asp.net 高亮显示鼠标所在行
2008-09-26 17:09
337 查看
调用的JavaScript:
<script type="text/javascript">
/*高亮显示鼠标所在行*/
function mouseovertd2(o)
{
dff=o.style.backgroundColor;
o.style.backgroundColor="#EAEBF1";
}
function mouseouttd2(o)
{
o.style.backgroundColor=dff;
}
</script>
GridView中的DataBound事件代码:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "mouseovertd2(this)");
e.Row.Attributes.Add("onmouseout", "mouseouttd2(this)");
e.Row.Attributes["style"] = "Cursor:hand";
}
}
<script type="text/javascript">
/*高亮显示鼠标所在行*/
function mouseovertd2(o)
{
dff=o.style.backgroundColor;
o.style.backgroundColor="#EAEBF1";
}
function mouseouttd2(o)
{
o.style.backgroundColor=dff;
}
</script>
GridView中的DataBound事件代码:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "mouseovertd2(this)");
e.Row.Attributes.Add("onmouseout", "mouseouttd2(this)");
e.Row.Attributes["style"] = "Cursor:hand";
}
}
相关文章推荐
- ASP.NET中,DataGrid控件鼠标所在行高亮显示特效
- 在ASP.NET中实现鼠标移动悬停在DataGrid时高亮显示这一行的方法
- asp.net(c#)GridView实现鼠标悬停高亮显示
- asp.net(c#) GridView实现鼠标悬停高亮显示
- asp.net(c#)GridView实现鼠标悬停高亮显示
- asp.net(c#)GridView实现鼠标悬停高亮显示
- 在ASP.NET的DataGrid中,鼠标点击某行进行高亮显示的解决方案
- ASP.NET MVC Bootstrap模板选中菜单高亮显示当前项方法
- asp.net(c#) datelist DataGrid 中截取字符串加"..." 和 鼠标放上去字符全部显示
- asp.net richTextBox中高亮显示选中字符串或文本
- 模拟在table中移动鼠标,高亮显示鼠标所在行
- asp.net鼠标悬停显示信息的方法
- asp.net中按钮在鼠标进入与离开时,显示不同的图片效果
- asp.net高亮显示搜索关键字的两个方法
- ASP.NET SignalR 与 LayIM2.0 配合轻松实现Web聊天室(七) 之 历史记录查询(时间,关键字,图片,文件),关键字高亮显示。
- Asp.Net中GridView加入鼠标滑过的高亮效果和单击行颜色改变
- Asp.Net中GridView加入鼠标滑过的高亮效果和单击行颜色改变
- ASP.NET MVC Bootstrap模板选中菜单高亮显示当前项方法
- Asp.net 中高亮显示搜索关键字简单方法
- asp.net GridView列数据鼠标移入显示提示信息