Answers for "return all class innerhtml in javascript"

0

return all class innerhtml in javascript

// 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);
}
Posted by: Guest on January-13-2021

Code answers related to "return all class innerhtml in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language