Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

extract content from string html

  function extractContent(s) {
    const span = document.createElement('span');
    span.innerHTML = s;
    return span.textContent || span.innerText;
  }
 
PREVIOUS NEXT
Tagged: #extract #content #string #html
ADD COMMENT
Topic
Name
6+5 =