HTTP 405 Error: Failed to load resource: the server responded with a status of 405 (Method Not Allowed)

carelessness:

    $.ajax({
        type: 'POST',
        async: false,
        url: url,
        dataType: 'json',
        contentType: 'application/json',
        data: JSON.stringify(postData),
        success: function(result){
            if(result.state==1){
                //成功
                var data = result.data.tableList;
                var sumnum = result.data.iSumNum;
                grid.setDatasource(data,sumnum);
            }else{
                cui.error("数据初始化失败");
            }
        }
    });
}
开始的时候没写url导致该错误

Read More: