0
我在使用phonegap和jQuery构建的移动应用程序中使用此代码我想从服务器显示图片,但无法集成showPageLoadingMsg
函数,我不相信这种类型的Ajax调用是有用的和强大的。所以我想知道我应该使用什么类型的Ajax调用,以及如何在我的Android手机应用程序中使用showPageLoadingMsg()
函数。jquery mobile ajax loader
server = "http://monserveur.com/upload.php";
var wid = $(window).width();
if (server) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState == 4){
alert('ready');
if (xmlhttp.status == 200 ) {
alert('200');
document.getElementById('ousa').innerHTML = xmlhttp.responseText;
}
else {
document.getElementById('ousa').innerHTML = "Error retrieving pictures from server.";
}
}
};
xmlhttp.open("GET", server+"?wid="+wid, true);
xmlhttp.send();
嗨!你在控制台上有任何错误吗? – Littm
“我不相信这种类型的Ajax调用是有用的和强大的”......真的吗?,这是每个和任何JS ajax _wrapper_的核心/引擎**,你会发现。 – cube