Answers for "custom function to strip html tags on javascript"

1

how to strip html tags in javascript

function stripHtml(html)
{
   let tmp = document.createElement("DIV");
   tmp.innerHTML = html;
   return tmp.textContent || tmp.innerText || "";
}
Posted by: Guest on March-01-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language