请问,我在用C#做ASP.NET web应用程序时,我现在绑定了一个DataGril网格控件,打开此web网页的时候,把我数据库中指定的表内容打开并显示出来啦,我现在想实现的功能是:当我鼠标移动到记录上时,此记录呈现高亮显示并且当鼠标移走时记录形状又恢复为原状!! 请问,该如何实现??谢谢!!! 还有,就是当我打开一个网页的时候,鼠标的形状也发生了变化,不在是默认的尖头形状,请问,应该如何实现??!
解决方案 »
- 这个查询sql该怎么写
- 谁知道怎么转类型
- 一个contains的问题,请高手指点
- 为什么我的生成略缩图功能经常会出现“GDI常规错误”?
- 自定义控件传值问题(100分 急问)
- 我想用一个SQL语句,在一个字段里插入一个单引号,这个SQL应该怎么写?
- 关于SQL的Insert into语句和Access的Insert into的差别,请教大家!
- 在TextBox中,输入完后,按回车键,怎么激发一个按钮的动作呢???
- 【高分请教】动网论坛的那种自动生成讨论区的代码应该怎么写!
- 高分-使用asp.net开发之前要注意什么(工程,窗体的命名规则,配置文件如何放置?)
- 有没有朋友在使用Asp.net 2.0 ,感觉如何,与1.1比变化大么?
- 怎样在页面和页面的用户控件进行交互 !~请教
if(e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item )
{
e.Item.Attributes.Add("onmouseover", "this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='#C8F7FF'");
e.Item.Attributes.Add("onmousedown", "this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='#C8F7FF'");
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor=this.oldcolor");
for (int i = 0; i< grdJieGuo.Columns.Count; i++ )
{
e.Item.Cells[i].Attributes.Add("onmouseover", "this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='#99ccff'");
//e.Item.Cells[i].Attributes.Add("onmousedown", "this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='#99ccff'");
e.Item.Cells[i].Attributes.Add("onmouseout", "this.style.backgroundColor=this.oldcolor");
}
}
{
//添加自定义属性,当鼠标移过来时设置该行的背景色为"6699ff",并保存原背景色
e.Item.Attributes.Add("onmouseover","currentcolor=this.style.backgroundColor;this.style.backgroundColor='#6699ff'");
//添加自定义属性,当鼠标移走时还原该行的背景色
e.Item.Attributes.Add("onmouseout","this.style.backgroundColor=currentcolor"); }
System.ComponentModel.Component如果是B/S程序,好像不可以控制吧?一起学习 :)
this.Cursor = Cursors.WaitCursor;:)
if(e.item.itemindex>=0)
{
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='#C8F7FF'");
e.Item.Attributes.Add("onmousemove", "this.style.backgroundColor=原颜色");
}
至于打开网页变鼠标
<BODY style='cursor:url(http://www.webjx.com/js/mouse/mouse.cur)'>
在body部分的style添加上述代码
http://www.kupage.com/webdesign/5/20031111/1005050000030vy7jhdx.htm或者你看下这个