怎么获取当前颜色改变的id
凉小北 2017-05-11 02:59:45 function xuanzhong(){
var bt1 = document.getElementById('u12');
var bt2 = document.getElementById('u14');
if ( bt1.style.backgroundColor == "coral" || bt2.style.backgroundColor == "coral"){
//window.location.href="https://www.baidu.com/";
}else{
alert("请选择您的身份");
}
}
当颜色改变时,获取当前ID