jQuery: read text file from file system

前端 未结 10 2489
再見小時候
再見小時候 2020-11-30 10:09

I am trying to read a text file using jquery, like this:

// LOAD file and split line by line and append divs
$.get(\'myFile.txt\', function(data) {    
    v         


        
10条回答
  •  渐次进展
    2020-11-30 10:41

    As long as the file does not need to be dynamically generated, e.g., a simple text or html file, you can test it locally WITHOUT a web server - just use a relative path.

提交回复
热议问题