【发布时间】:2013-08-02 18:36:50
【问题描述】:
本地 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);
})
}
【问题讨论】:
-
文件名是“excel.xml”还是“EXCEL.xml”?
-
它的 EXCEL.xml。字母大小写有什么区别吗?
-
是的,在某些情况下:stackoverflow.com/questions/6502712/…
-
我从来没想过。是 .XML 而不是 .xml 造成了问题。谢谢
-
回答您的问题并将其标记为正确答案。这样它就不会出现在未回答的类别中
标签: jquery jquery-mobile cordova