snipplets.dev/code/JavaScript/textContent.js
2023-09-26 22:05:13 +03:00

4 lines
146 B
JavaScript

document.getElementById('element').textContent;
// If you need to target < IE9 then you need to use
document.getElementById('element').innerText;