jQuery Ajax请求在Android上返回错误

时间:2018-11-07 12:59:09

标签: jquery html ajax

我在尝试使用Android执行请求时遇到错误。在PC浏览器上,一切正常,但是在Android上,我没有任何反应。我的错误返回是 状态:“错误”,thrownException为空。

我正在尝试使用chrome 70在android 8.0和5.0中执行

这是我的代码:

    function abc(url, myFunction){
    $.support.cors = true;
    $.allowCrossDomainPages = true;
    $.ajax({
        url: url,
        dataType: 'html',
        cache: false,
        crossDomain: true,
        success: function(html){
            myFunction(html);
            alert(String(JSON.stringify(html)));
        },
            error: function(html, a, b){  
            alert("obj: " + html + "\n" + "Status: " + a  + "\n" + "Error: " +b);
        }
    });
} 

谢谢。

0 个答案:

没有答案