//新增根据数组下表remove元素方法 Array.prototype.remove = function(obj){ for(var i=0;i<this.length;i++){ var temp = this[i]; if(!isNaN(obj)){ temp=i; } if(temp == obj){ for(var j=i ;j<length;j++){ this[j] = this[J+1]; } this.length = this.length-1 ; } } }
时间: 2024-10-10 17:29:28