我想在按钮被点击时改变颜色并弹出消息提示。
function colorChange() {
document.getElementById('word').style.color = "red";
alert("color changed!");
}
我无法在警告框弹出时同时更改颜色。