可以使用Get with EXTJS [英] Can I use Get with EXTJS

查看:103
本文介绍了可以使用Get with EXTJS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用JQuery多年后正在学习ExtJS。我喜欢JQuery的易用性,但是我很难用ExtJ做类似的事情。目前我正在尝试获取一个PHP页面,同时传递一个参数。在重新运行时,我需要使用数据填充一个选择框。使用JQuery,调用将如下所示:

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);
});

我可以用ExtJS这样做吗?

Can I do something like this with ExtJS?

推荐答案

是的,你应该可以使用 Ext.Ajax.request(),并写下如下:

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);
    }
});

这篇关于可以使用Get with EXTJS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆