且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

jQuery getJSON在函数中不起作用

更新时间:2022-06-05 23:52:11

你的功能看起来不对尝试

Your function doesnt look right try

function getAllDepts() {
    $.getJSON('MyFilePath', function(data) {
        var items = [];
        $.each(data, function(key, val) {
            //Doing things with my data.
        });
    });
}