jQuery empty() vs remove()

后端 未结 3 1774
孤街浪徒
孤街浪徒 2020-12-12 15:25

What\'s the difference between empty() and remove()methods in jQuery, and when we call any of these methods, the objects being created

3条回答
  •  伪装坚强ぢ
    2020-12-12 15:59

    $("body").empty() -- it' removes the HTML DOM elements inside the body tag -

    when you declare $("body").remove() - it remove the entire HTML DOM along with body TAG .

提交回复
热议问题