snipplets.dev/~/JavaScript/textContent.js

4 lines
146 B
JavaScript
Raw Normal View History

2022-03-26 03:37:19 +03:00
document.getElementById('element').textContent;
// If you need to target < IE9 then you need to use
document.getElementById('element').innerText;