0

当我的 ajax 调用我的加载微调器时,请检查一下我犯了什么错误

提前致谢

   $.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');
          }
    });         
4

0 回答 0