我对 jQuery 1.7.2 和ajax函数有疑问,因为当我调用下面的代码时,我在 Firefox Firebug 控制台中收到以下错误:
NS_ERROR_XPC_NOT_ENOUGH_ARGS:没有足够的参数 [nsIDOMLocation.replace]
    var weights= new Object();
    // weight is then manipulated in here
    $.ajax(
        {
            url: '/admin/countries/index.php',
            data: ({action: 'sort', cid: cid, weights: weights}),
            dataType: 'json',
            success: function(data){                    
                alert('suck-sess');
                                    // do stuff in here
            },
            error: function (request, status, error) {
                alert(request.responseText);
            }
        }
    )
我什至不确定它是否成功发出请求,因为当我$_REQUEST["action"]在我的index.phpPHP 中转储它时它是空白的,而它显然应该是“排序”的。
当我执行代码时,我没有收到成功或错误警报,所以我看不到错误来自哪里。