您不能指望同时处理两个单独的 ajax 调用,因为 JS 是单线程的(并且 AJAX 调用是异步的,以免您指定它们不是 - 但这是要避免的),因此不能期望同时处理两个单独的 ajax 调用。另外:您不能期望 JS 考虑您为任何函数指定的参数数量,并且知道在两个参数都有值之前它不应该调用该函数。
最后:您能否具体说明您的问题是什么:您在询问如何调用另一个函数,但在这两种情况下,您似乎都在传递相同的成功回调。您能否详细说明两个调用都将返回哪些数据,以及您要发送哪些数据?
如果您希望仅在两次调用都成功后才调用函数,则可以使用闭包:
var callme = (function()
{
    var JSON1, JSON2;
    return function(response)//this function will receive each response separately
    {
        JSON1 = JSON1 || response;//if JSON1 isn't set, assign current response
        if (JSON1 !== response)
        {//JSON1 was already set, second response is in
            JSON2 = response;
            //code to process both responses at once goes here
            //but make them undefined before returning, if not, a second call won't work as expected
            JSON1 = undefined;
            JSON2 = undefined;
        }
    };
}();
$.ajax({url: 'some/url',
       data: yourData1,
       type: 'GET',
       success: callme});
$.ajax({url: 'second/url',
        data: yourData2,
        type: 'GET',
        success: callme});
请记住,闭包(callme函数)在 AJAX 调用之前至关重要:由于callme分配函数(作为表达式)的方式,函数声明不会被提升!