var arr = [], elems = document.querySelectorAll('div p'), i = 0; for(; i<elems.length; i++) arr.push(elems[i].innerHTML);