问题来源

当我这里设置为 text/plain 时会直接将html代码输出并不解析
【HTML】text/html与text/plain有什么区别

解决思路

res.setHeader()请求头中

  • text/html是以html的形式输出,比如就会在页面上显示一个文本框
  • text/plain形式就会在页面上原样显示这段代码

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2021-10-09
  • 2021-07-30
  • 2022-12-23
  • 2021-05-04
  • 2022-12-23
猜你喜欢
  • 2022-01-30
  • 2022-12-23
  • 2021-06-18
  • 2022-12-23
相关资源
相似解决方案