📜  在javascript代码示例中返回所有类innerhtml

📅  最后修改于: 2022-03-11 15:04:11.788000             🧑  作者: Mango

代码示例1
// It will retrun all innerHTML value into console.log
var elts = document.getElementsByClassName('nice-name');
for (var i = 0; i < elts.length; ++i) {
    console.log(elts[i].innerHTML);
}