jquery mobile出现phonegap 404 ajax错误.但在Firefox、IE中运行良好



本地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);
       })
   }

Android系统对文件名区分大小写。是.XML而不是.XML造成了这个问题。感谢

最新更新