日期:2014-05-16  浏览次数:20330 次

去掉js数组中重复的数据
for(var j=0;j<temp.length;j++){
    for(var f=j+1;f<temp.length;f++){
         if(temp[j]==temp[f]){
	     temp.splice(j,1);
            j--;
	     break;
      }
   }
}

?