js 数组默认是按照数字的字母顺序排序
<script type="text/javascript">
var arr=['float', 'zindex', 'xy', 'absolute', 'blue', 'leo'];
arr.sort();
alert(arr);
</script>
<script type="text/javascript">
var arr=[96, 8, 12, 72, 33, 118];
arr.sort(function (num1, num2){
return num1-num2;
});
alert(arr);
</script>