var divs = document.querySelectorAll("div.e.sensors_exposure");
for (var i = 0; i < divs.length; i++) {
divs[i].classList.add("on");
}
2023年 4月,工作多难找呢?
51job不让批量投了!服务器挂了吧。
如果是要对click加些处理,用监视:
var divs = document.querySelectorAll("div.e_icons.ick");
for (var i = 0; i < divs.length; i++) {
divs[i].addEventListener("click", function() {
// change the background color of the clicked div
this.style.backgroundColor = "red";
// add a "clicked" class to the clicked div
this.classList.add("clicked");
});
}