JavaScript 字符串 string split 拆分方法


JavaScript 字符串 string split 拆分方法

<html>
   <head>
      <title>JavaScript String split() Method</title>
   </head>

   <body>

      <script type = "text/javascript">
         var str = "Apples are round, and apples are juicy.";
         var splitted = str.split(" ", 3);
         document.write( splitted );
      </script>

   </body>
</html>