<template id="test">
</template>
let indexDoc = document;
let currentDoc = indexDoc.currentScript.ownerDocument;
let temp = currentDoc.getElementById("test");
JS获取HTML插入template的DOM节点
最新推荐文章于 2022-09-04 14:57:10 发布
<template id="test">
</template>
let indexDoc = document;
let currentDoc = indexDoc.currentScript.ownerDocument;
let temp = currentDoc.getElementById("test");