トップに戻る
tags
DOMParser を使用します。
// Aタグのリンクを抽出する const html = '...................' const dom = new DOMParser().parseFromString(html, 'text/html') const imgs = dom.querySelectorAll('img') imgs.forEach(img => { console.log('● img.src') console.log(img.src) })
edit