his.style.backgroundColor=color1;,color都这个值吗?
解决方案 »
- 如何实现数据同步更新
- 类似CSDN的那样注册功能如何实现
- 难解的js 问题
- |M| Javascript问题:在同一TR中如何取某一个TD里面的值
- 图片显示不出问题 谢谢~~~~
- 急召.ASP.net程序员
- 请教sql语句:如何把a表中的一条记录插入到b表中,a、b表设计相同
- 服務端按鈕按過一次以後。每次按F5都會執行按鈕裏面的代碼,怎麽解決。
- 把N个DATATABLE复制到一个DATATABLE中
- 有哪位大哥有在客戶端的日期校驗函數?
- 主从表GridView数据,主表中checkbox打勾,则显示相应从表数据;若去掉勾,则相应去掉对应从表详细信息。这个该怎么实现?
- c# 控件FileUpload 怎么实现图片上传后带出预览功能? b/s
color1=this.style.backgroundColor 这玩意解析不了
http://bbs.csdn.net/topics/340261706
e.Row.Attributes.Add("onmouseover", "onmouseoverColor2(this);");function onmouseoutColor2(source) {
source.style.backgroundColor = '#F7F6F3';
source.style.color = 'black';
source.style.cursor = 'default'
}
function onmouseoverColor2(source) {
source.style.backgroundColor = '#F2FECD';
source.style.color = 'orange';
source.style.cursor = 'hand'
}
问题是一样的。鼠标没效果,背景也没效果。只有字体有效果。
在行绑定事件中写如下:
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.cursor='hand';color1=this.style.backgroundColor;this.style.backgroundColor='#ffffcc'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=color1;this.style.cursor='default';");
}