HTML 部分:
<div style="display: none" id="svgCon"></div>
JS 部分:
const svgCon = document.getElementById('svgCon') svgCon.innerHTML = '<svg>xxxxx'; const svg = svgCon.querySelector('svg')
Ref:SVGElement
Ref:https://so.muouseo.com/qa/9yp682qre6nk.html
Link:https://www.cnblogs.com/farwish/p/16743625.html
标签:svgCon,const,SVGElement,svg,FAQ,Ref From: https://www.cnblogs.com/farwish/p/16743625.html