Jquery 2个数组,去除重复的项目

长数组(Positions_Check)

短数组(PositionTitlesParent_Check)   

 

for (var i = 0; i < PositionTitlesParent_Check.length; i++) {
        for (var j = 0; j < Positions_Check.length; j++) {
            if (PositionTitlesParent_Check[i] == Positions_Check[j]) {
                Positions_Check.splice($.inArray(Positions_Check[j], Positions_Check), 1);
                j--;
            }
        }
    }

posted on 2015-09-15 17:24  Parning  阅读(1556)  评论(0编辑  收藏  举报