Jquery remove form tag, not content

后端 未结 6 650
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-17 01:33

Hello i need to remove a form tag but non the content:

not remove this only the form tag
6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-17 01:36

    $('.element').replaceWith(function() {
    

    return $(this).html(); });

    This is wrong....

    $form = $('#form');
    

    $form.replaceWith($form.html());

    This one is correct...

提交回复
热议问题