Some text
23.12
I have HTML document:
Some text
-
Here is another way (assuming the elements contain classes text
and date
)
var coll = document.querySelectorAll(".text, .date"); //Get HTML elements having class .text and .date
var elements = [].slice.call(coll); //Convert to array
elements.map(function(el,i) { console.log(el.innerHTML.trim()) }); //Display element innerHTML using `map` function
Some text
23.12