<script type="text/
javascript">
var str ="1,2,3,1,2,3";
var arr = [];
str = str.replace(/([^,]*)/g, function($0, $1, i){
if(str.indexof($1) == i) arr[arr.length] = $1;
});
document.write(arr.join(','));
</script>
var str="36,35,26,41,42,36,36,35,41,25,26,";var ret = [];var re = str.split(',');str.replace(/[^,]+/g, function($0, $1) { (str.indexof($0) == $1) && ret.push($0)})alert(ret)