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

返回值:ArrayjQuery.unique(array)

概述

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

参数

arrayArrayV1.1.3

待处理数组。

示例

描述:

删除重复 div 标签。

jQuery 代码:
$.unique(document.getElementsByTagName("div"));
结果:
[<div>, <div>, ...]
相关文章
jquery easyui实现可编辑表格jquery easyui dwr loader dwr装载器 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 sort array by keysphp pair converts the pair to an arrayphp bzip2 函数 返回包含 bzip2 错误号和错误字符串的一个 arrayphp frontbase 函数 get a result row as an enumerated arrayphp libxml 函数 retrieve array of errorsphp mysqlnd ms 函数 returns an array which describes the last used connectionphp socket 函数 get array with contents of getaddrinfo about the given hostnamephp xml rpc 函数 determines if an array value represents an xmlrpc faultphp judy search for the last index in the judy arrayphp mongodb driver writeresult returns an array of identifiers for upserted documentsphp reflectionparameter checks if parameter expects an arrayphp splfixedarray constructs a new fixed array
关注编程学问公众号
编程学问网 湘ICP备20001732号