87,991
社区成员
发帖
与我相关
我的任务
分享
function GetConditons(){
Ext.Ajax.request({
url : 'servers/viewdata/Conditions.ashx?_menuID='+uid,
method:'POST',
timeout:10000,
async : ture,//这里改成同步
success:function(response,option){
if(response.responseText=="数据为空"){
Ext.MessageBox.hide();
Ext.MessageBox.alert('提示','数据为空');
}else{
var json = Ext.JSON.decode(response.responseText);
var condi = eval(json.CONDITIONS);
alert(condi);//[object Object],[object Object],[object Object],[object Object],[object Object]
}
}
});
return condi;//这里返回得到的数据
}
var condi = new GetConditons();
alert(condi);//这样应该可以了
success:function(response,option){
if(response.responseText=="数据为空"){
Ext.MessageBox.hide();
Ext.MessageBox.alert('提示','数据为空')};
var json = Ext.JSON.decode(response.responseText);
var condi = eval(json.CONDITIONS);
alert(condi);//[object Object],[object Object],[object Object],[object Object],[object Object]
return condi;}
这里return是没有用的 如果你需要另外的函数来处理的话
return condi改成 functionname(condi)