"Unexpected token :"
var http = require( 'http' ), express = require( 'express' ), app = express(), server = http.createServer( app );app.get( '/', function( req, res ) { console.log( 'req received' ); res.setHeader('Content-Type', 'application/json'); res.end( JSON.stringify({ Name : "Tom", Description : "Hello it's me!" }) );});server.listen(3000, function() { console.log( 'Listening on 3000' );});
"/"
{"Name":"Tom","Description":"Hello it's me!"}
.
$.ajax({ url: findUrl, type: 'get', dataType: 'jsonp', success: function ( data ) { self.name( data.Name ); self.description( data.Description ); }, error: function( jqXHR, textStatus, errorThrown ) { alert(errorThrown); }});
"jQuery111108398571682628244_1403193212453 was not called"
杨__羊羊
相关分类