时间:2021-07-01 10:21:17 帮助过:26人阅读
var http = require (‘http‘);
var fs = require (‘fs‘);
var qs=require(‘querystring‘);
var hostname=‘127.0.0.1‘;
var port=8080;
//创建服务
var server=http.createServer(function(req,res){
if(req.url!==‘./favicon.ico‘){
req.on(‘data‘,function(data){
console.log(‘服务器接收到的数据:‘+decodeURIComponent(data));
var param=qs.parse(decodeURIComponent(data));
console.log(param);
})
}
})
node提交表单到mysql
标签:str create ons string icon decode mysq param component