怎样通过类名获取元素节点集合

方法1: 使用 document.getElementsByClassName();

方法2: 使用 document.querySelectorAll();

document.getElementsByClassName("app");
document.querySelectorAll(".app");
原文地址:https://www.cnblogs.com/aisowe/p/11543384.html