2012-11-09 39 views
1

我創建一個phonegap測試應用程序,因爲我想通過webservice(.asmx)從數據庫獲取數據。我只是這個技術的更新。我已經花了2天的時間爲這個電話posible bt couldnt。 從phonegap android應用程序調用本地.asmx webservice來獲取數據?

 
    function test() 
    { 
    jQuery.support.cors = true; 
     $.mobile.allowCrossDomainPages = true; 
      $.ajax({ 
      data: "{}", 
      type: "GET", 
      dataType: "json", 
      contentType: "application/json; charset=utf-8",
url: "http://localhost:xxxxx/yyyy/testservice.asmx?op=testfunction", success: function (msg) { $('#divToBeWorkedOn').html(msg.text); }, error: function (e) { $('#divToBeWorkedOn').html("unavailable"); } }); }

它的本地服務。

+0

你的webservice是本地還是live? –

+0

其在本系統中的本地服務。 – lakhani

回答

相關問題