Home  >  Q&A  >  body text

javascript - A strange error occurred when using ajax to handle get cross-domain. .

Only $.ajax is shown here. In fact, I have also used $.get and $.getJSON to get the data, but a common error was reported! ! !
The data can be obtained!!

phpcn_u1582phpcn_u15822689 days ago639

reply all(3)I'll reply

  • 世界只因有你

    世界只因有你2017-05-19 10:12:09

    The format of

    json is: {"a":"123"}
    jsonp的格式是:callback({"a":"123"});
    所以,会报那个意外的字符:.

    reply
    0
  • 滿天的星座

    滿天的星座2017-05-19 10:12:09

    The requested address is not the returned jsonp data.

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-19 10:12:09

    First you have to determine whether the parameter passed in is an object or a json string, and then see if your analysis is correct

    reply
    0
  • Cancelreply