📅  最后修改于: 2022-03-11 15:03:32.297000             🧑  作者: Mango
代码示例6
var x = document.getElementsByClassName("example");
var i;
for (i = 0; i < x.length; i++) {
x[i].style.backgroundColor = "red";
}