extjs4 扩展ajax,extjs4 - Ajax.request using ExtJs - Stack Overflow

博主遇到在尝试从localhost加载JSON内容时遇到405错误。错误信息显示请求被拒绝,状态码为405。尽管URL正确且文件存在,Firebug显示NetworkError:405 Not Allowed。问题可能涉及请求方法不被服务器支持。参数 `_dc=1336714070619` 是Ext.Ajax.request中GET请求的一部分,可能与请求的处理有关。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I'm having difficulty loading JSON content from a file. console.log prints "server-side failure with status code 0", meaning that the request failed.

My JSON file URL is correct and the file is present at the given address.

Firebug shows the error:

"NetworkError: 405 Not Allowed - http://localhost:8080/4910.json?_dc=1336714070619

and the Net tag shows status 405 not allowed.

Any ideas on why this is happening?

Ext.Ajax.request({

url: 'http://localhost:8080/4910.json',

success: function(response, opts) {

var obj = Ext.decode(response.responseText);

console.log(obj[0].name);

},

failure: function(response, opts) {

console.log('server-side failure with status code ' + response.status);

}

});

Also, what is adding the parameter _dc=1336714070619 to the end of the GET request?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值