var oneTime=1;
var oldRows;
var reclick=1;
function selectedRow(trs){
var flag;
if(oldRows==trs){
if(reclick==3){
reclick=1;
}else{
reclick=3;
}
flag=false;
}else{
flag=true;
reclick=2;
}
if(flag==true&&oneTime==2&&reclick==2){
oldRows.bgColor="white";
trs.bgColor="#99FF99";
reclick=3;
}else if(flag==true&&oneTime==1){
trs.bgColor="#99FF99";
reclick=3;
oneTime=2;
}else{
if(reclick==3){
trs.bgColor="#99FF99";
}else{
trs.bgColor="white";
}
}
oldRows=trs;
}
js处理table的选中行换色
最新推荐文章于 2022-05-20 10:15:30 发布