JS - 중국어 정렬

1807 단어 JavaScripthtmlapple
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
   <script type="text/javascript"> 
  function startSort(){
  var a=document.getElementById('s').value; 
  a=a.split(',') ;
  a.sort(); 
  document.getElementById('r1').value=a;
  a.sort(function(a,b){  return a.localeCompare(b)}  ); 
  document.getElementById('r2').value=a; 
  } 
  
 
  </script>
 </HEAD>

 <BODY>
 
  <p>          (   ","  ):
  <br /> 
  <textarea id="s" style="width: 100%; overflow: scroll; word-wrap: normal;" rows="10">   ,a,zbort,   , omething,  ,   ,   ,  , apple,   ,  </textarea>
  </p> 
  <p style="text-align: center">
  <input type="button" value="    " onclick="startSort()" style="width: 300px" /></p> 
  <p>      :<br /> <textarea id="r1" style="width: 100%; overflow: scroll; word-wrap: normal;" rows="10"></textarea></p>
  <p>          :<br /> <textarea id="r2" style="width: 100%; overflow: scroll; word-wrap: normal;" rows="10"></textarea></p> 
 </BODY>
</HTML>

좋은 웹페이지 즐겨찾기