I have
<div class="ce">
<div class="lotB">9</div>
<div class="lotB">3</div>
<div class="lotB">28</div> == $0
</div>
I'm trying to get these three numbers 9, 3, 28
but I can't get this to work :s
Already tried several different things and I also read about innerText and tried to get it work by going through the class ce
like that
var x = document.getElementsByClassName("ce");
for (var i = 0; i < x.length; i++) {
var numbers = x[i].innerText;
alert(numbers);
}
But also this didn't give me anything : /
How do you get this inner text of each these classes, so I got the numbers 9, 3, 28
?