jquery mobile with phonegap 404 ajax错误。但在Firefox,IE中运行良好

时间:2013-08-02 18:36:51

标签: jquery jquery-mobile cordova

本地Xml文件(excel.xml)位于根文件夹的xml文件夹中。它在Firefox,IE中运行良好。但不适用于Android 4.0。我正在使用phonegap来构建。请协助。

   function LoadDB(isToolTip) {
       $.support.cors = true;
       $.mobile.allowCrossDomainPages = true;

       QuestionDB = new Array();
       $.ajax({
           url: 'xml/EXCEL.xml',
           dataType: 'xml',
           type: 'GET'

       }).done(function (data) {
           QuestionDB = $(data).find('Record');
           // alert(QuestionDB.length + " : " + data)
           if (isToolTip)
               showTip();
       }).fail(function (jqXHR, txtStatus, trownError) {
           alert("failed : " + txtStatus);
           alert(jqXHR.status);
           alert(trownError);
           alert(jqXHR.responseText);
       })
   }

1 个答案:

答案 0 :(得分:0)

Android系统对文件名区分大小写。  它是.XML而不是.xml来创建问题。谢谢