问题
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