ExtJs 常用方法(alert confirm prompt show wait)
2016-09-25 15:13
337 查看
1、alert方法
2、confirm方法
3、prompt方法
--------------------------------
// 提示框 Ext.MessageBox.alert("提示信息","hello world!!!"); Ext.Msg.alert('ExtJs'); alert('执行');注:执行到ExtJs中的alert方法不会停止运行。不同于原生的js alert方法
2、confirm方法
<span style="white-space:pre"> </span>//询问框 Ext.Msg.confirm('提示信息','确认要删除这条信息吗?',function(op){ if(op == 'yes'){ alert("确认删除"); }else{ alert("取消了"); } })
3、prompt方法
<span style="white-space:pre"> </span>//输入框 Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){ if (btn == 'ok'){ // process text value and close... alert('ok'); } console.info(btn); // 按钮 console.info(text); //输入框内容 });4、show方法
//自定义提示信息 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, //显示的btn icon: Ext.Msg.QUESTION//图标 4种 INFO QUESTION ERROR WARNING });5、wait方法
//等待框1 /*var p = Ext.create('Ext.ProgressBar', { renderTo: Ext.getBody(), width: 300 }); // Wait for 5 seconds, then update the status el (progress bar will auto-reset) p.wait({ interval: 500, //bar will move fast! duration: 50000, increment: 15, text: 'Updating...', scope: this, fn: function(){ p.updateText('Done!'); } });*/ //等待框2 Ext.Msg.wait('提示信息','我是内容',{ interval: 500, //循环定时的间隔 duration: 10000, //总时长 increment: 5, //走完一次进度条次数 text: 'Updating...', //进度条上的文字 scope: this, //作用范围 fn: function(){ //回调函数 alert('更新成功!!!'); } })
--------------------------------
相关文章推荐
- ExtJs 常用方法(alert confirm prompt show wait)
- Ext.MessageBox学习,包括alert,confirm,prompt,wait和show的使用方法
- 在Android的webview中定制js的alert,confirm和prompt对话框的方法
- 在Android的webview中定做js的alert,confirm和prompt对话框的方法
- (转)在Android的webview中定制js的alert,confirm和prompt对话框的方法
- 在Android的webview中定制js的alert,confirm和prompt对话框的方法
- 在Android的webview中定制js的alert,confirm和prompt对话框的方法
- Javascript中的window对象基本属性和方法以及对alert,confirm,prompt的使用
- ExtJs--02--MessageBox相关弹出窗口alert,prompt,confirm采用
- ExtJs--02--MessageBox相关弹窗alert,prompt,confirm使用
- 在Android的webview中定做js的alert,confirm和prompt对话框的方法
- window对象的alert() confirm() prompt()方法
- Android webview中定制js的alert,confirm和prompt对话框的方法 (处理webview 带网站地址的弹出框)
- 在Android的webview中定制js的alert,confirm和prompt对话框的方法
- 在Android的webview中定制js的alert,confirm和prompt对话框的方法
- Android WebView封装及定制js的alert,confirm和prompt对话框的方法
- Python脚本控制的WebDriver 常用操作 <二十二> 处理alert / confirm / prompt
- 在Android的webview中定制js的alert,confirm和prompt对话框的方法
- Android webview中定制js的alert,confirm和prompt对话框的方法 (处理webview 带网站地址的弹出框)
- 在Android的webview中定制js的alert,confirm和prompt对话框的方法