客户端
('#textid').val(jsonobj.wendu);
$('#texttwo').val(jsonobj.shidu);
},
error:function(){
console.log(json);
},
timeout:3000
});
服务端
var server=http.createServer(function(req,res){
if(req.url!=="/favicon.ico"){
//res.writeHead(200,{"Content-Type":"text/plain","Access-Control-Allow-Origin":"http://localhost"});
var str = "success_jsonpCallback("+JSON.stringify(dat)+")";
res.write(str);
}
res.end();
});