var a=[1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7]
var b=[ ]
for (var i=0 ;i<a.length ;i++) {
var status = 0;
for (var j=0 ;j<b.length ;j++) {
if(a[i]==b[j]){
status = 1;
break;
}
}
if(status == 0){
b.push(a[i])
}
}
for(var x in b){
document.write(b[x]+" ")
}
时间: 2024-10-29 14:43:28