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

返回值:Array<Element(s)>:parent

V1.0概述

匹配含有子元素或者文本的元素

示例

描述:

查找所有含有子元素或者文本的 td 元素

HTML 代码:
<table>
  <tr><td>Value 1</td><td></td></tr>
  <tr><td>Value 2</td><td></td></tr>
</table>
jQuery 代码:
$("td:parent")
结果:
[ <td>Value 1</td>, <td>Value 2</td> ]
相关文章
jquery mobile collapsible set动态创建显示的方法jquery easyui filebox 文件框 jquery easyui progressbar 进度条 jquery easyui datebox 日期输入框 jquery easyui editable datagrid 可编辑表格 animated jquerycallbacks.add callbacks jqueryparent child jqueryclearqueue queuename jquerydeferred.notifywith context args jquery disabled jqueryevent.ispropagationstopped jqueryfadetoggle speed easing fn jquery header jqueryis expr|obj|ele|fn jqueryparent expr jquery parent jqueryjquery parent > childjquery parent expr jquery parent
关注编程学问公众号
编程学问网 湘ICP备20001732号