问答详情
源自:7-19 指定分隔符连接数组元素join()

指定分隔符分割数组

如果分隔符为空格呢?该怎么表示

提问者:ylq 2015-09-16 13:40

个回答

  • qq_水无声_03882251
    2016-09-20 11:03:49

    join("&nbsp")

    这样就可以了

  • refeal
    2016-04-18 13:52:51

    myarr.join(" ");

  • huliyichen
    2015-09-16 14:32:04

    object.join(" ");空格作为分割符

    <script type="text/javascript">

        var myarr1= new Array("86","010")

        var myarr2= new Array("84697581");

        var myarr3= myarr1.concat(myarr2);

        document.write(myarr3,"<br/>");

        document.write(myarr3.join(" "));

    </script>