jQuery删除表单标签,而不是内容 [英] Jquery remove form tag, not content
本文介绍了jQuery删除表单标签,而不是内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我需要删除一个表单标签,但没有内容:
Hello i need to remove a form tag but non the content:
<form id="form">
<div> not remove this only the form tag</div>
</form>
推荐答案
$form = $('#form');
$form.replaceWith($form.html());
应该做你所需要的.
这篇关于jQuery删除表单标签,而不是内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文