私はこのコードを持っています:
function retrieve_districts(){
var json='';
$.get("http://localhost/aaa/districts.php",function(result, textStatus) {
if(textStatus=="success"){
json=JSON.parse(JSON.stringify(result)); (alert works fine here)
}
}, "json");
alert(json);
}
しかし、アラートは空です。どうすればよいですか? どうもありがとうございます