Получите текст тега
var el = document.querySelector('div');
text = el.textContent || el.innerText;
console.log(text);
Curious Tom
var el = document.querySelector('div');
text = el.textContent || el.innerText;
console.log(text);