简体   繁体   中英

Does Windows 8 Phone support JQuery ajax call when using PhoneGap?

I'm using the PhoneGap platform. Does Windows Phone 8 support a JQuery Mobile ajax call? My code:

      $.ajax({
      type: 'POST',
      url: 'some URL',
      data: senddata,
      dataType: 'text'  
  });

This call works on iPhone and Android device but not on Windows 8 Phone. Is anyone using ajax to post to a URL on Windows 8 Phone via using JQuery and PhoneGap?

Please try the options below:

$(document).on( "mobileinit", function() {
  $.support.cors = true;
  $.mobile.allowCrossDomainPages = true;
  $.mobile.phonegapNavigationEnabled = true;
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM