HTML5を使用しています。AJAXでAPIを呼び出したい。しかし、これを実行するのは成功しません。plz私がこれをどのように使用するかを教えてください。このコードPhoneGapを実装したい。Plzは、問題や最良のロジックがあれば私に提案します...
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.1.min.js"></script>
<script>
function loadXMLDoc()
{
alert("okey");
$.ajax({
type: 'GET',
url:'http://www.internationalprom.com/mobile/ipa.php',
data:{ft:'get',cat:'gallery',action:'top100'},
success: onsuccess,
error : onerror,
});
function onsuccess(data){
alert("success 1: "+ data );
// if got success then How i retrive Data from here?
}
function onerror(data){
alert("error 1 :"+data);
}
}
</script>
</head>
<body>
<h2>My CD Collection:</h2>
<div id="myDiv"></div>
<button type="button" onclick="loadXMLDoc()">Get my CD collection</button>
</body>
</html>
ありがとう...