返回列表

数组忽略大小写排序

默认分类 2011-08-24 18:42:43

var arr=["c","b","a","f","E"]; arr.sort(function(a,b){return a.toLowerCase()>b.toLowerCase()?1:-1;}); alert(arr);