您的位置:首页 > 其它

高亮显示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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: