摘要: res.writeHead(301, { //301为重定向即跳转,location为跳转的页面 Location: '/list' }); res.end(); 阅读全文
posted @ 2020-11-26 16:12 WP-WangPin 阅读(484) 评论(0) 推荐(0) 编辑
摘要: let formData = ''; //接受post参数 req.on('data', param => { //post分多次接受数据 formData += param; //将每次接受的数据拼接在一起 }); req.on('end', async () => { //数据接受完毕后执行的方 阅读全文
posted @ 2020-11-26 16:10 WP-WangPin 阅读(489) 评论(0) 推荐(0) 编辑