2013年12月25日
摘要: Array.prototype.remove = function(index){ if(isNaN(index) || index > this.length){return false;} for(var i = 0, n = 0; i < this.length; i++){ if(this[i] != this[index]){ this[n++] = this[i]; } } this.length -= 1; } //在数组中获取指定值的元素索引 Array.pr... 阅读全文
posted @ 2013-12-25 10:41 老茶壶 阅读(302) 评论(0) 推荐(0) 编辑