var id =window.document.getElementById(atr).style.backgroundColor = "#ff6a00"; 不能改变背景 有什么错误么?
atr加个引号............getElementById("atr")..............