您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

一个简单的Ext.XTemplate的实例代码_extjs

2026/1/11 1:37:44发布17次查看
把省份与城市以树的形式输出
复制代码 代码如下:
ext.lib.ajax.request(
'post',
'/index/mainindex',
{ success: function (data) {
data.responsetext = {pros: + data.responsetext + }; //获取后台回调的省份城市json格式数据
var response = ext.util.json.decode(data.responsetext);
var province = new ext.xtemplate(
'',//遍历读取pros
'{id}--{text}
',
'',//遍历读取pros下的children
'{id}--{text}
',
'',
''
);
province.compile();
province.append(div2, response);
}
}
);
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product