标签:
var tmp = ‘1,6,6,7,7,8,2,3,3,4,4,5‘; var tmpJson = {}; $.each(tmp.split(‘,‘), function(i, n){ tmpJson[‘a‘+n] = n; }); var tmpArr = []; $.each(tmpJson, function(i,n){ tmpArr.push(n) }); console.log(tmpArr.sort())
标签:
原文地址:http://my.oschina.net/lvkun0223/blog/488520