我正在尝试以最简单的方式向现有内容中添加新文本,在我的情况下,我只能修改段落元素中的脚本,但是我收到此错误Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node
。如何以最短的代码使它起作用?
<!-- Many elements above this -->
<p>
This a part of the text
<script>
document.currentScript.parentNode.appendChild(" and this is the new text added");
</script>
</p>
<!-- Many elements under this -->