1つのphonegapテストアプリケーションを作成しています。そのために、データベースからWebサービス(.asmx)を介してデータが必要です。私はこの技術のためにちょうど新しいです。私はこの呼び出しのために2日を費やしました可能性のあるbtはできませんでした。
機能テスト()
{{
jQuery.support.cors = true;
$ .mobile.allowCrossDomainPages = true;
$ .ajax({
データ: "{}"、
タイプ:「GET」、
dataType: "json"、
contentType: "application / json; charset = utf-8"、
url: "http:// localhost:xxxxx / yyyy / testservice.asmx?op = testfunction"、
成功:関数(msg){
$('#divToBeWorkedOn')。html(msg.text);
}、
エラー:関数(e){
$('#divToBeWorkedOn')。html( "unavailable");
}
});
}
そのローカルサービス。