//Ext的信息提示框,相当于javascript的alert,第一个参数为提示框的标题,第二个参数为提示内容 Ext.Msg.alert('Status', 'Changes saved successfully.'); //可以与用户交互的window,用户输入信息,点击确定,获取用户输入信息进行操作 //第一个参数为提示框标题 //第二个参数为提示信息 //第三个参数是毁掉方法,在毁掉方法中可以根据用户点击的按钮和输入的信息进行相关操作 Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){ if (btn == 'ok'){ // process text value and close... } }); //包含三个按钮的提示框,根据用户点击的按钮做不同的操作 Ext.Msg.show({ //提示框标题 title:'Save Changes?', //提示信息 msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?', //包含的按钮 buttons: Ext.Msg.YESNOCANCEL, //响应方法 fn: processResult, animateTarget: 'elId', //图标 icon: Ext.window.MessageBox.QUESTION }); function showResult(btn){ Ext.example.msg('Button Click', 'You clicked the {0} button', btn); }; //以上三类都是提示信息窗口,下面的窗口是用来显示信息的弹出窗口 var searchWin = Ext.create('Ext.window.Window', { //window标题 title : "设备检索", //window的id,根据ID可以取得窗口对象 id : 'searchWin', width : 440, height : 200, //window包含的元素 items : searchPanel, //自适应滚动条 autoScroll : true, //当弹出窗口时,背景变灰,为不可操作状态 modal : true, //设置窗口样式 bodyStyle : { background : '#ffffff', margin : 'auto' } }) //显示窗口 searchWin.show();