📅  最后修改于: 2022-03-11 15:03:00.199000             🧑  作者: Mango
// Change it to red
canvas.style.backgroundColor = "#ff0000";
// Change it to the value of a text input
canvas.style.backgroundColor = document.getElementById("myTextInput").value;