ajax加载图片不会来

时间:2013-07-31 12:10:24

标签: html5 jquery jquery-mobile

当我的ajax调用我的加载微调器没有来时plz检查出我做了什么错误

提前致谢

   $.ajax({
     type: "GET",
     url: "one.html",
     contentType: "text/xml",
     dataType: "xml",
     data: "",
     beforeSend: function () {
        $.mobile.loading('show', {
           text: "Loading...",
           textVisible: true,
           theme: "a",
           textonly: false,
           html: ""
        });
     },
      complete: function () {
        $.mobile.loading('hide');
     },
      crossDomain:true,
     success: function (data) { 
         alert("success");
     },
     error: function (data){
        alert("error");
     }
   });  

即使我也使用过这些代码,但它也无效

 $(document).on({
          ajaxStart: function () {      
          $.mobile.loading('show', {
             text: "Loading...",
             textVisible: true,
             theme: "d",
             textonly: false,
             html: ""
          });
          },
              ajaxStop: function () {     
              $.mobile.loading('hide');
          }
    });         

0 个答案:

没有答案