这是我的代码如下.我试图扭转已经发出的点击.这是用td标签发生的.我在这里和其他论坛上结合了几个问题的失败实验.
function changeColor(elem) {
if (elem.style.backgroundColor = "#5AD9C1" || "transparent") {
elem.style.backgroundColor = "#66FF66";
} else if (element.style.backgroundColor = "#66FF66") {
elem.style.backgroundColor = "#5AD9C1";
}
};
Run Code Online (Sandbox Code Playgroud)