1.在请求之前加一个mask图层
2.在回调函数里首先把图层隐藏掉
- hide();
简单的示例如下
//gp为form表单
var gp=Ext.getCmp("deviceInterfereAttachmentsViewGridPanel"); var myMask = new Ext.LoadMask(Ext.getBody(),{msg:"正在导入,请稍等..."}); myMask.show(); Ext.Ajax.request({ url:"deviceAction!importDevInfo.action", method:"POST", params:{ id:id }, success:function(){ myMask.hide(); Ext.Msg.alert("消息","导入成功..."); }, failure:function(){
myMask.hide(); Ext.Msg.alert("消息","导入失败"); } });