jquery-easyui的combotree在.net开发中的问题

it2022-05-05  165

一搜索,发现好多人在问:问题见:http://jquery-easyui.wikidot.com/forum/t-248817/combotree-net“combotree在.net开发中,一直不显示数据。单独html页面就可以显示出来。同一数据文件,json格式绝对正确。”

解决问题首先要发现原因,用firebug试了一下,发现是combotree读取json的时候是用POST方法。而.net环境不支持静态文件用POST方法获取内容。错误如下:POST app_user.jshttp://localhost:9655/js/app_user.js405 Method Not Allowed

发现原因后,解决问题就简单很多。找到easyui的js代码:_41.addClass(”tree-loading”);$.ajax({type:”post”,url:_3e.url,data:_3c,dataType:”json”,success:function(_42){_41.removeClass(”tree-loading”);

在我的应用中,因为不需要POST方式获取json,就把type:”post”改为type:”get”即可。已在easyui的官方论坛中说明这个问题,希望以后能多个method的设置选项

转载于:https://www.cnblogs.com/delin/archive/2010/09/30/1839463.html


最新回复(0)