html

<pre >
</pre>

/js

发送ajax请求,请求到数据后,渲染在pre标签上,文本的换行回车,需要通过pre标签来读取,

var url = "/public/aaa/cmd/123.txt";
$.ajax({
url: url,
async: false,
success: function (data) {
console.log(data);
$('#myText').html(data)
}
})
 

相关文章:

  • 2022-12-23
  • 2021-07-19
  • 2021-08-28
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
猜你喜欢
  • 2022-12-23
  • 2021-08-12
  • 2022-12-23
  • 2021-12-09
  • 2022-01-16
  • 2022-12-23
  • 2021-07-25
相关资源
相似解决方案