SCRIPT type="text/javascript"
function defaultSort(){
var a="zhishi,english,我lai,lai了,中国,测试,房地产";
a=a.split(",");
a.sort();
alert(a);
}
function cusSort(){
var a="zhishi,english,我lai,lai了,中国,测试,房地产";
a=a.split(",");
a.sort(function(a,b){
return a.localeCompare(b);
});
alert(a);
}
/SCRIPT
a href="#" onClick="defaultSort();"默认排序/abr
a href="#" onClick="cusSort();"拼音排序/a