function changeStyle(obj){
//获得表头的行
var header = document.getElementById("header");
var tr = document.getElementsByTagName("tr");
for(var i=1;i<tr.length;i++){
if(tr[i] == obj){
tr[i].style.backgroundColor = "#FFCCFF"; //粉红
tr[i].οnmοuseοut="";
tr[i].οnmοuseοver="";
}else{
//恢复其他非选中行的背景样式和事件(表头行除外)_
if(tr[i] != header){
tr[i].style.backgroundColor = "#ffffff"; //白色
}
tr[i].onmouseout = function(){
this.style.backgroundColor='#ffffff';
}
tr[i].onmouseover = function(){
this.style.backgroundColor='#e7fbff'; //浅蓝色
}
}
}
}
//获得表头的行
var header = document.getElementById("header");
var tr = document.getElementsByTagName("tr");
for(var i=1;i<tr.length;i++){
if(tr[i] == obj){
tr[i].style.backgroundColor = "#FFCCFF"; //粉红
tr[i].οnmοuseοut="";
tr[i].οnmοuseοver="";
}else{
//恢复其他非选中行的背景样式和事件(表头行除外)_
if(tr[i] != header){
tr[i].style.backgroundColor = "#ffffff"; //白色
}
tr[i].onmouseout = function(){
this.style.backgroundColor='#ffffff';
}
tr[i].onmouseover = function(){
this.style.backgroundColor='#e7fbff'; //浅蓝色
}
}
}
}