javascript - Why does this JSONP cross-domain request fail?
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-06-28 09:23:15
0
1
756

I use Douban’s API.

The following is the error report.

You can see the returned data in the error URL.

I don’t understand why it failed. It’s my first time to use jsonp and ask Dalao for advice

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(1)
ringa_lee

alert('error');
There is a semicolon missing

Then are you sure that the jsonp format returned by the page you requested meets the standard?

You should visit this address:
https://api.douban.com/v2/boo...

Change in the code:
jsonp:"callback",
jsonpCallback:"jsonp",

Supplement:
Sorry for the complicated thinking, just change this line
jsonp:"callback",

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template