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

返回值:jQueryempty()

V1.0概述

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

示例

描述:

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

HTML 代码:
<p>Hello, <span>Person</span> <a href="#">and person</a></p>
jQuery 代码:
$("p").empty();
结果:
<p></p>
相关文章
jquery easyui tooltip 提示框 jquery easyui columns extension for datagrid 列扩展表格 jquery easyui linkbutton 按钮 jquery easyui slider 滑动条 after content|fn jquery attribute=value jquerycallbacks.empty jquerycallbacks.lock jquerycss name|pro| val|fn jquerydeferred.resolvewith context args jqueryempty jquery empty jqueryerror data fn jqueryevent.target jqueryfocusout data fn jqueryjquery cal.empty jquery empty jquery emptyphp pair returns whether the pair is emptyphp splheap constructs a new empty heap
关注编程学问公众号
编程学问网 湘ICP备20001732号