为什么设置数据在$getJson调用中不起作用。未在getJson调用中设置WTF变量。另外,另一个问题是为什么不能在getJson调用中设置$(this).html()。我全局定义了wtf变量,但是我没有从getJson函数获得值,我想知道为什么数据不可访问。这是由ajax函数和async: seto to false解决的。function () { var data=null;
var customer; //global variable $.getJSON("http://localhost/ Remove all the previous option of the drop down customer = jQuery.parseJSON(opts); //Attempt to pars