Array.prototype.filterArr = function(){
var targArr = this;
var newArr = new Array();
for(var i=0,count=targArr.length;i<count;i++){
//若是數組元素爲無心義元素
if(targArr[i]!=null&&targArr[i]!=""&&targArr[i]!="undefined"){
var _tempString_ = newArr.toString();
if(_tempString_.indexOf(targArr[i])<0){
newArr.push(targArr[i]);//植入數組中
}
}
}
return newArr;
}數組