var html; $.ajaxSettings.async = false; //加上这个就可以了 $.getJSON(PATH + "/user/findUser.action?userVO.user.id=" + data["user_design_id"],function(result){ html = result }); alert(html);
var html; $.ajaxSettings.async = false; //加上这个就可以了 $.getJSON(PATH + "/user/findUser.action?userVO.user.id=" + data["user_design_id"],function(result){ html = result }); alert(html);