Can I use Get with EXTJS

不羁的心 提交于 2020-01-15 11:32:54

问题


I'm in the process of learning ExtJS after using JQuery for years. I like the ease of use with JQuery but I'm having difficulty trying to do similar things with ExtJs. Currently I'm trying to get a PHP page while passing it an argument. In retrun I need to populate a select box with the data. With JQuery the call would look something like this:

$.get("test.php?id=abc", function(data){
    $('#result').html(data);
});

Can I do something like this with ExtJS?


回答1:


Yes, you should be able to use Ext.Ajax.request() and write something like:

Ext.Ajax.request({
    url: "test.php?id=abc",
    method: "GET",
    success: function(response) {
        Ext.get("result").update(response.responseText);
    }
});


来源:https://stackoverflow.com/questions/9704687/can-i-use-get-with-extjs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!