📜  前端 javascript 从远程读取文本文件 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:29.610000             🧑  作者: Mango

代码示例1
// As with JSON, use the Fetch API & ES6
fetch('something.txt')
  .then(response => response.text())
  .then(data => {
      // Do something with your data
      console.log(data);
  });