var r = '';
$.ajax({
type: "POST",
url: "webservice/DataService.asmx/GetAccount",
data: "{AccountNo: '" + Code +"' }",
contentType: "application/json; charset=utf-8",
dataType: "json",
//async: false, //假設沒有這行
success: function(msg){
if (msg.length > 0) { r = msg; }
}
});
return r;
記得加加看這一行喔. async: false,
沒有留言:
張貼留言