1 function delCongfu(typeArray){ 2 3 var str = []; 4 for(var i = 0,len = typeArray.length;i < len;i++){ 5 ! RegExp(typeArray[i],"g").test(str.join(",")) && (str.push(typeArray[i])); 6 } 7 alert(str); 8 9 } 10 //传入数组typeArray,生成的新数组str.
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3