<script type="text/javascript">
//去重
Array.prototype.unique = function(){
var res = [];
var json = {};
for(var i = 0; i < this.length; i++){
if(!json[this[i]]){
res.push(this[i]);
json[this[i]] = 1;
}
}
return res;
}
var a = [1,2,3,4,5,2,3,4];
var b = [5,6,7,8,5,6];
var arr = a.concat(b);//合并
document.write(arr.unique());
</script>