nodejs ajax 不适用框架的情况下转域报错
if(req.url!=="/favicon.ico"){ console.log(“here is ok”); res.writeHead(200,{“Content-Type”:“text/plain”,“Access-Control-Allow-Origin”:“http://localhost:”}); res.header(“Access-Control-Allow-Origin”,"*"); res.send(fileb); } 为什么运行时报错: res.header is not a function
6 回复