Split string with JavaScript

后端 未结 3 1730
萌比男神i
萌比男神i 2021-01-02 17:44

how to parse this string with java script

19 51 2.108997
20 47 2.1089

like this

19 51 2.108997         


        
3条回答
  •  说谎
    说谎 (楼主)
    2021-01-02 18:14

    Like this:

    var myString = "19 51 2.108997";
    var stringParts = myString.split(" ");
    var html = "" + stringParts[0] + " " + stringParts[1] + " " + stringParts[2] + "

提交回复
热议问题