Answers for "get element based on text content js"

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

Code answers related to "get element based on text content js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language