//0217-2.js
var http = require('http');
var url = require('url');
http.createServer(function (req, res) {
res.writeHead(200, {
'Content-Type': 'text/html; charset=utf-8',
});
var query = url.parse(req.url,true).query;
res.write(query.year+'<br>');
res.write(query.month+'<br>');
res.end();
}).listen(8080);
沒有留言:
張貼留言