获取`script`标签中的代码内容

index.html

<script id="script">
  // .text || .innerText || .innerHTML
  alert(document.getElementById("script").text);
</script>

posted on 2021-09-10 09:47  aisowe  阅读(617)  评论(0编辑  收藏  举报

导航