【问题标题】:Error with JSONP {"readyState":4,"status":200,"statusText":"load"}JSONP {"readyState":4,"status":200,"statusText":"load"} 出错
【发布时间】:2017-06-15 18:23:44
【问题描述】:

我将命令发送到外部服务器到 url,我在 html 代码上得到了 {"readyState":4,"status":200,"statusText":"load"}。但在控制台中,我得到了您可以在图像上看到的良好数据。

有什么帮助吗?

结果:

【问题讨论】:

  • 请不要粘贴图片。粘贴您的代码+输出+您遇到的错误+您想要的预期结果,在您的问题中。
  • 我没有错误,输出只是 {“readyState”:4,“status”:200,“statusText”:“load”}。现在它适用于 muttalebm 提供的修改。

标签: php jquery ajax


【解决方案1】:

您需要将结果包装在 json 回调字符串中。 使用echo $_GET['jsoncallback'].'('.$result.')';

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-04-06
    • 1970-01-01
    • 2013-10-24
    • 2011-10-24
    • 2018-12-24
    • 2014-12-17
    • 1970-01-01
    相关资源
    最近更新 更多