Answers for "how to parse html data in js"

2

js parse string to html elemen

htmlString = "<body><p>Hello World</p></body>"
var parser = new DOMParser();
var doc = parser.parseFromString(htmlString, "text/html")
doc.body
Posted by: Guest on June-05-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language