编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
jQuery API 开发手册

返回值:jQueryempty()

V1.0概述

删除匹配的元素集合中所有的子节点。

示例

描述:

把所有段落的子元素(包括文本节点)删除

HTML 代码:
<p>Hello, <span>Person</span> <a href="#">and person</a></p>
jQuery 代码:
$("p").empty();
结果:
<p></p>
相关文章
jquery easyui easyui更新说明jquery easyui cell editing in datagrid 单元格编辑表格 jquery easyui menu 菜单 jquery easyui timespinner 时间微调 addclass class|fn jquery attribute$=value jquerycallbacks.empty jquerycallbacks.has callback jquerycontext jquerydeferred.resolve args jqueryempty jquery empty jquery eq index jqueryevent.stoppropagation jqueryfocusin data fn jqueryjquery cal.empty jquery empty jquery emptyphp map returns whether the map is emptyphp spldoublylinkedlist checks whether the doubly linked list is empty
关注编程学问公众号
编程学问网 湘ICP备20001732号