Loading an array from .txt file

前端 未结 2 884
伪装坚强ぢ
伪装坚强ぢ 2021-01-15 13:45

I need to load an array from a .txt file. It has few strings separated by commas (,).

So far I have found this.

That guy splits it with .split

2条回答
  •  自闭症患者
    2021-01-15 14:18

    You can read html files locally since html5. Check the html5 API and some examples here. Then use Alexanders answer to parse it.

    EDIT: here and here are some good and short examples on how to use it.

提交回复
热议问题