这是如何工作的(div cirlcedecider2 的样式为“绿色”)
function badge1(){
if (document.getElementById("circledecider2").style.color == "green"){
document.getElementById("badge1").style.backgroundColor= "#ABCF37";
document.getElementById("badge1").style.width = "200px";
document.getElementById("badge1").style.height = "200px";
}}
但这不?(div cirlcedecider2 的样式为“#ABCF37”)
function badge1(){
if (document.getElementById("circledecider2").style.color == "#ABCF37"){
document.getElementById("badge1").style.backgroundColor= "#ABCF37";
document.getElementById("badge1").style.width = "200px";
document.getElementById("badge1").style.height = "200px";
}}
唯一的区别是使用十六进制代码。