<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript">
var arr =[123,344,334,2334];
arr.sort(function(n1,n2){
if(n1<n2){
return -1;
}
else if(n1>n2){
return 1;
}
else{
return 0;
}
})
alert(arr)
</script>
</head>
<body>
</body>
</html>
Web_lastRookie
相关分类