search

Home  >  Q&A  >  body text

javascript - The front-end uses the jquery.jsonp.js plug-in to report cross-domain errors SyntaxError: Unexpected token:

I want to use the jquery.jsonp.js plug-in on the front end without any processing in the background.
This format is $.jsonp({ ... }). I have read all the examples on the Internet, but the error SyntaxError: Unexpected token:
Does anyone know what is going on? Has anyone used it? Thanks.

高洛峰高洛峰2787 days ago971

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-07-05 10:43:10

    The final data format returned by the request address is not jsonp data format. The jsonp data format should be: jsonpCallback({msg:'this is json data'}) . It is recommended that the browser check the final responsedata

    of the network request.

    reply
    0
  • Cancelreply