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"); } }); }
它的本地服務。
你的webservice是本地還是live? –
其在本系統中的本地服務。 – lakhani