//獲取數組重復的元素
function refrain(arr) {
var tmp = [];
if(Array.isArray(arr)) {
arr.concat().sort().sort(function(a,b) {
if(a==b && tmp.indexOf(a) === -1) tmp.push(a);
});
}
return tmp;
}