把document.getElementById(s).style.backgroundColor='red';修改为this.style.backgroundColor='red';
将document.getElementById(s).style.backgroundColor='red';改为this.style.backgroundColor='red';
用jquery吧