search

Home  >  Q&A  >  body text

node.js - 如何利用nodejs进行前后端的数据传递?

在html文件中引入的js代码里使用ajax请求向服务器端发送数据请求,将这些数据写入文件,再次读取文件时,如何将读取到的文件数据重新传递出来?

迷茫迷茫2783 days ago485

reply all(2)I'll reply

  • 迷茫

    迷茫2017-04-17 15:26:33

    The front end sends a ajax request. According to the request method get,post, you can use the Route module express
    or the route.post() method of route.get() . I have a small demo here for reference. Demo

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 15:26:33

    Have you not graduated from elementary school? Or is it from a training institution? Please see the nodejs documentation

    reply
    0
  • Cancelreply