Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to strip html tags in javascript

function stripHtml(html)
{
   let tmp = document.createElement("DIV");
   tmp.innerHTML = html;
   return tmp.textContent || tmp.innerText || "";
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #strip #html #tags #javascript
ADD COMMENT
Topic
Name
1+5 =