【问题标题】:Phonegap ios app documents ajax status 404Phonegap ios应用程序记录ajax状态404
【发布时间】:2015-10-26 12:07:07
【问题描述】:

当我尝试 ios app 文档文件时,在 ios9 中,Phonegap ajax 返回状态 404。 我的代码,

 $.ajax({
url: external_file_dir + 'templates/index.htm',
success: function (adata) {
 $('body').append(adata.substring(adata.indexOf('<body>') + 6, adata.indexOf('</body>')));
 $('head').append(adata.substring(adata.indexOf('<head>') + 6, adata.indexOf('</head>')));
 },
error: function (objects) {
 alert("responseText : " + objects.responseText);
 alert("status : " + objects.status);
 alert("statusText : " + objects.statusText);
} 
})

【问题讨论】:

    标签: ajax cordova http-status-code-404 ios9 status


    【解决方案1】:

    在 IOS URL 中到应用程序文档是区分大小写的,如果我给出正确的文件名并区分大小写,它将起作用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-03-30
      • 1970-01-01
      • 2011-11-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多