Array.prototype.remove = fucntion(obj) {
                for(var i in this) {
                    if(typeof this[i] == "object") {
                        var flag = true;
                        for(var attr in this[i]){
                            if(this[i][attr] != obj[attr]){
                                flag = false;
                                break;
                            }
                        }
                        if(flag) {
                            this.splice(i,1);
                        }
                    } else {
                        if(this[i] == obj) {
                            this.splice(i,1);
                        }
                    }
                }
            }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
  • 2021-12-03
  • 2021-11-21
猜你喜欢
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-02-28
  • 2022-12-23
  • 2022-01-11
相关资源
相似解决方案