62,074
社区成员
发帖
与我相关
我的任务
分享
e.Row.Attributes.Add("onclick", e.Row.ClientID.ToString() + ".checked=true;selectx(this)");//点击行变色。
<script type="text/javascript">
var prevselitem=null;
function selectx(row)
{
if(prevselitem!=null)
{
//alert("2");
prevselitem.style.backgroundColor='#ffffff';
}
row.style.backgroundColor='Blue';alert(row.style.backgroundColor);
prevselitem=row;
}
</script>