字符数组和数值数组排序sort
1.字符数组
var members=["China","Jap","America","Korean"]; members=members.sort();<span style="white-space: normal;"> </span>
var numbers=[12,3,34]; numbers=numbers.sort(function(a,b){ return a-b; }); function validate_phoneno(phoneno){ var pattern=new RegExp(/^[0-9-+]+$/); return pattern.test(phoneno); }