可以试试 `DOMParser` const parser = new DOMParser(); const htmlStr = "some html string"; const html = parser.parseFromString(htmlStr, "text/html"); const images = Array.from(html.querySelectorAll("img")).map((img) => img.src);
阅读量:1
点赞量:0