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

返回值:NumberjQuery.toArray()

V1.4概述

把jQuery集合中所有DOM元素恢复成一个数组。

示例

描述:

得到所有li的元素数组

jQuery 代码:
alert($('li').toArray());
结果:
[<li id="foo">, <li id="bar">]
相关文章
jquery mobile collapsible set动态创建显示的方法jquery easyui filebox 文件框 jquery easyui progressbar 进度条 jquery easyui datebox 日期输入框 jquery easyui editable datagrid 可编辑表格 animated jquerycallbacks.add callbacks jqueryclearqueue queuename jquerydeferred.notifywith context args jquery disabled jqueryevent.ispropagationstopped jqueryfadetoggle speed easing fn jquery header jqueryis expr|obj|ele|fn jqueryjquery.get url data callback type jqueryjquery.noop jqueryjquery.toarray jquerykeypress data fn jquerymouseover data fn jqueryjquery $.toarray
关注编程学问公众号
编程学问网 湘ICP备20001732号