<script type="text/javascript"> //比较另类的办法是...... //嘿嘿....只要数组内的元素是数值或字符应该都OK var arr=[6,4,4,4,4,4,3,3,7,1,3,3,3,3,2,2,2,2,9,99,9,9,5,5]; var temp = {}; for ( i=0;i<arr.length;i++ ){ temp[arr[i]]=1; } var result = []; for ( var k in temp ) { result.push(k); } alert(result); </script>