这让我抓狂,我无法获取外部变量获取内部数据
很抱歉我用电话写的格式不好,如果有人可以帮助我解决格式,我很感激
window.getReasons = function(line) {
var $reasons;
$reasons = "";
$.get(window.location.protocol + "//" + window.location.host + "/" + "allLineReasons.js?line=" + line, function(returnData) {
$reasons = returnData.toString();
return console.log("T_T ----->" + returnData.toString());
}, "html");
console.log($reasons);
return $reasons;
};