Javascript 如何创建节点并将其传递给函数?
我有以下资料:Javascript 如何创建节点并将其传递给函数?,javascript,jquery,contenteditable,textnode,Javascript,Jquery,Contenteditable,Textnode,我有以下资料: <div contenteditable="true"> <p>Here is some text blah <span class="tag">meme</span> hello world.</p> </div> 你知道我如何告诉var textNode去追踪span吗 谢谢最简单的方法是使用jquery $("span").after(textNode); 要创建文本节点还是将插入符号放置在
<div contenteditable="true">
<p>Here is some text blah <span class="tag">meme</span> hello world.</p>
</div>
你知道我如何告诉var textNode去追踪span吗
谢谢最简单的方法是使用jquery
$("span").after(textNode);
要创建文本节点还是将插入符号放置在给定位置?您的问题标题和正文不匹配…什么是textNode?你的问题是什么?
$("span").after(textNode);