Ext3.1.1(二) MessageBox

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qwkxq/article/details/56831231



 Ext.onReady(function(){
	    	//Ext.MessageBox.alert("title","first msg box");
	    	
	    	//Ext.MessageBox.alert("title","msg",function(){alert("关闭对话框后弹出!")});
	     	
	     	//Ext.MessageBox.confirm("title","msg",function(e){alert(e);});
	    	
	    	//this的参数位置代表作用域,true的参数位置代表是否多行
	    	//Ext.MessageBox.prompt("title","msg",function(e,text){alert(e+"-"+text);},this,true);
	     
	     	Ext.MessageBox.show({
			    title:"标题",
			    msg:"内容的消息",
			    buttons:{"ok":"我不再显示OK了"},
			    fn:function(e){alert(e);},//关闭弹窗执行的方法
			    animEl:"test1",//代表在哪个dom上显示动画
			     width:500,
			    icon:Ext.MessageBox.INFO,
			    closable:false,
			    progress:true,
			    progressText:"进度条",
			    msg:"5s后关闭对话框",
			    wait:true,//动态显示进度条
			    waitConfig:{
			    	interval:600,//0.6s进度条自动加载一定长度
                    duration:5000,//持续5s
                    fn:function(){//duration 时间到了执行的函数
                      Ext.MessageBox.hide();//让进度条消失
                	}
			    },
			    prompt:true,
			    multiline:true,
			});
			//setTimeout(function(){Ext.MessageBox.hide()},5000);//5后执行关闭窗口函数
	     });


猜你喜欢

转载自blog.csdn.net/qwkxq/article/details/56831231