Ext.MessageBox.Show使用Progress
在此之前,先添加引用:以下引用方式仅供参考:由于我的extjs文件夹放在script文件夹下
<link href="~/Scripts/extjs/resources/ext-theme-neptune/ext-theme-neptune-all.css" rel="stylesheet" />
<!--4.0后用bootstrap.js替代adapter\-->
<script src="~/Scripts/extjs/bootstrap.js"></script>
<script src="~/Scripts/extjs/locale/ext-lang-zh_CN.js"></script>
<script type="text/javascript" >
Ext.onReady(function () {
//Show progress dialog
Ext.Msg.show({
title: "Message",
msg: "Loading,please wait...",
icon: Ext.Msg.INFO,
progress: true,
closable: false,
width:350,
fn: function (btn, txt) {
//alert(Ext.String.format("click the '{0}' value is '{1}'", btn, txt));
}
});
//progress bar refresh count、percent、display msg
var count = 0, percent = 0, progressMsg;
//define timers task to update progress info
var task = {
run: function () {
count++;
percent = count;
// Ext.Msg.alert("d",percent);
progressMsg = Ext.String.format("当前进度:{0}%,当前时间:{1}", percent,Ext.Date.format(new Date(),"Y-m-d H:i:s ms"));
Ext.Msg.updateProgress(percent/100, progressMsg);
if (count >= 100)
{
Ext.TaskManager.stop(task);
//Ext.Msg.hide("destory");
Ext.Msg.alert("信息", "加载完毕");
}
},
interval:10
};
Ext.TaskManager.start(task);
})
</script>
o啦,就这么简单就可以创建一个progress,如图:

连css都省了 爽吧!
以上仅供参考,如有问题 欢迎指出...
Ext.MessageBox.Show使用Progress的更多相关文章
- 实用ExtJS教程100例-003:进度条对话框Ext.MessageBox.progress
在上一篇内容中我们介绍了三种常用的MessageBox提示框,在这篇文章中,我们将演示如何在对话框中使用进度条. 进度条对话框 我们可以使用下面的代码来在MessageBox中显示一个进度条: Ext ...
- Ext.MessageBox消息框
Ext JS消息提示框主要包括:alert.confirm.prompt.show 1.Ext.MessageBox.alert() 调用格式: alert( String title, String ...
- [转载]ExtJs4 笔记(6) Ext.MessageBox 消息对话框
作者:李盼(Lipan) 出处:[Lipan] (http://www.cnblogs.com/lipan/)版权声明:本文的版权归作者与博客园共有.转载时须注明本文的详细链接,否则作者将保留追究其法 ...
- Ext.MessageBox
Ext.require([ 'Ext.window.MessageBox', 'Ext.tip.*' ]); Ext.onReady(function(){ Ext.MessageBox.confir ...
- Ext.MessageBox的用法
1.Ext.MessageBox.alert()方法 有四个参数:alert( title , msg , function(){} ,this) 其中title,msg为必选参数,function为 ...
- ExtJs4 笔记(6) Ext.MessageBox 消息对话框
本篇演示消息对话框的用法,ExtJs封装了可能用到的各类消息框,并支持自定义的配置. 如下是用到的html: [html] <h1>各种消息框</h1> <div id= ...
- 【编程技巧】Ext.MessageBox 大集合 不同的dialog图解加写法
1.alert对话框 效果图: function a1(){ Ext.MessageBox.alert('title','text'); } 2.confirm案例,确定不确定2个按钮对话框 效果图 ...
- 实用ExtJS教程100例-005:自定义对话框Ext.MessageBox.show
我们对ExtJS对话框进行了三篇演示: MessageBox的三种用法 进度条对话框Ext.MessageBox.progress 等待对话框Ext.MessageBox.wait 通过上面三篇内容的 ...
- 94. Ext.MessageBox消息框
转自:https://www.cnblogs.com/libingql/archive/2012/03/30/2426198.html Ext JS消息提示框主要包括:alert.confirm.pr ...
随机推荐
- Android 实现GIF播放(解码)
实现原理很简单,先把GIF动画解码成多张Bitmap图片,然后放到AnimationDrawable里面去逐一播放即可. GifHelper代码: package com.android.view; ...
- 四轴飞行器1.1 Matlab 姿态显示
四轴飞行器1.1 Matlab 姿态显示 开始做四轴了,一步一步来,东西实在很多,比较杂.先做matlab上位机,主要用来做数据分析,等板子到了可以写飞控的程序了,从底层一层一层开始写..希望能好好的 ...
- nyoj 21三个水杯(BFS + 栈)
题目链接: http://acm.nyist.net/JudgeOnline/problem.php?pid=21 思想: 看了一下搜索就来写了这题(BFS 找出最短路径 所以用此来进行搜索) 这题在 ...
- MySQL zerofill 的用法
creata table t(x int(6) zerofill,y int); insert into t(x,y) values(1,1); select x,y from t;
- 工具类_java 操作cookie
import java.io.UnsupportedEncodingException;import java.net.URLDecoder;import java.net.URLEncoder;im ...
- HDU 5875 Function(ST表+二分)
[题目链接] http://acm.hdu.edu.cn/showproblem.php?pid=5875 [题目大意] 给出一个数列,同时给出多个询问,每个询问给出一个区间,要求算出区间从左边开始不 ...
- oracle rac ha
ha,仅只是在操作系统层面进行数据库的监控和管理,一般只针对单实例数据库使用.优点是管理方便,应用开发方便(方便了开发商):工程投入较小.缺点是,具有所有单实例数据库的缺点:如:容错能力差,续航能力差 ...
- hive原生和复合类型的数据载入和使用
原生类型 原生类型包含TINYINT,SMALLINT,INT,BIGINT,BOOLEAN,FLOAT,DOUBLE,STRING,BINARY (Hive 0.8.0以上才可用),TIMESTAM ...
- popupwindow 模拟新浪、腾讯title弹框效果
.jpg外部引用 原始文档 MainActivity.java外部引用 原始文档 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ...
- Cocos2d-iPhone V3 (2) 场景转换
Cocos2d-iPhone V3 (2) 场景转换 博客:http://blog.csdn.net/prevention 作者:大锐哥 - 1. 准备工作 创建一个场景会吧? #import &qu ...