摘要: js删除数组重复Array.prototype.unique = function() { var a = {}; for (var i = 0; i < this.length; i++) { if (typeof a[this[i]] == "undefined") a[this[i]] = 1; } this.length = 0; for (var i in a) this[this.length] = i; return this;}完 阅读全文
posted @ 2012-02-13 14:20 wangkangluo1 阅读(592) 评论(0) 推荐(0) 编辑