Answers for "find element inside html text"

3

get text inside element javascript

// get the text inside an element
const text = element.innerText;

// get the html content inside an element
const html = element.innerHTML;
Posted by: Guest on May-30-2021
0

get the text of a tag

var el = document.querySelector('div');
text = el.textContent || el.innerText;
console.log(text);
Posted by: Guest on March-02-2022

Code answers related to "find element inside html text"

Code answers related to "Javascript"

Browse Popular Code Answers by Language