高亮显示datagrid中鼠标选中的行
2004-11-27 12:54
501 查看
用于实现高亮显示datagrid中鼠标选中的行,当在datagrid的内容较多的时候,此段程序方便用户的查看。
<script language="javascript">
var backcol
var currcol = "#ffff99"
function currstyle(obj)
{
var i
for(i=0;i<document.all("DataGrid1").rows.length;i++)
{
if( document.all("DataGrid1").rows(i).style.backgroundColor == currcol)
{
document.all("DataGrid1").rows(i).style.backgroundColor = backcol
}
}
backcol = obj.style.backgroundColor
obj.style.backgroundColor = currcol
}
</script>
<script language="javascript">
var backcol
var currcol = "#ffff99"
function currstyle(obj)
{
var i
for(i=0;i<document.all("DataGrid1").rows.length;i++)
{
if( document.all("DataGrid1").rows(i).style.backgroundColor == currcol)
{
document.all("DataGrid1").rows(i).style.backgroundColor = backcol
}
}
backcol = obj.style.backgroundColor
obj.style.backgroundColor = currcol
}
</script>
相关文章推荐
- 利用JMF进行摄像头拍照:
- 用win2000启动菜单实现windows全家福
- 留言板
- 窗体设计技巧
- HMAC 的理解
- 一个比较好的ASP翻页!
- 看看别人对Borland的抱怨,delphi8我是没有用来开发过,不过,打算转向Delphi2005,
- "一位台湾学校校长的演讲"
- 动态滚动信息
- CCNA 基础练习题(3)
- 超酷透明窗口
- 当你有了两个blogs怎么办?
- 用Collection和HttpSessionListener获取当前所有会话信息
- xpi插件的安装
- Love is ...
- CCNA 基础练习题(2)
- Eclipse, OSGI与Plugin机制杂谈
- Linux的基础知识
- 开始我的BLOG!
- ASP.NET 中如何防范SQL注入式攻击?