复制代码 代码如下:
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(
'
'
{id}--{text}
','
'
{id}--{text}
','
'
);
province.compile();
province.append("Div2", response);
}
}
);



