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

返回值:ArrayjQuery.unique(array)

概述

删除数组中重复元素。只处理删除DOM元素数组,而不能处理字符串或者数字数组。

参数

arrayArrayV1.1.3

待处理数组。

示例

描述:

删除重复 div 标签。

jQuery 代码:
$.unique(document.getElementsByTagName("div"));
结果:
[<div>, <div>, ...]
相关文章
jquery easyui datagrid filter row 可过滤行的数据表格 jquery.grep array callback invert jqueryjquery.inarray value array fromindex jqueryjquery.unique array jqueryjquery $.grep array fn invert jquery $.unique array jquery $.uniquesort array php arrayiterator return current array entryphp deque converts the deque to an arrayphp apd 函数 get an array of the current variables names in the local scopephp dbase 函数 gets a record from a database as an indexed arrayphp ingres 函数 fetch a row of result into an enumerated arrayphp mssql 函数 fetch a result row as an associative array a numeric array or bothphp runkit 函数 return numerically indexed array of registered superglobalsphp sybase 函数 fetch row as arrayphp judy search for the first absent index in the judy arrayphp mongodb driver cursor returns an array containing all results for this cursorphp phar return array of supported signature typesphp spldoublylinkedlist return current array entryphp swoole coroutine call a callback with an array of parameters
关注编程学问公众号
编程学问网 湘ICP备20001732号