在此之前,先添加引用:以下引用方式仅供参考:由于我的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的更多相关文章

  1. 实用ExtJS教程100例-003:进度条对话框Ext.MessageBox.progress

    在上一篇内容中我们介绍了三种常用的MessageBox提示框,在这篇文章中,我们将演示如何在对话框中使用进度条. 进度条对话框 我们可以使用下面的代码来在MessageBox中显示一个进度条: Ext ...

  2. Ext.MessageBox消息框

    Ext JS消息提示框主要包括:alert.confirm.prompt.show 1.Ext.MessageBox.alert() 调用格式: alert( String title, String ...

  3. [转载]ExtJs4 笔记(6) Ext.MessageBox 消息对话框

    作者:李盼(Lipan) 出处:[Lipan] (http://www.cnblogs.com/lipan/)版权声明:本文的版权归作者与博客园共有.转载时须注明本文的详细链接,否则作者将保留追究其法 ...

  4. Ext.MessageBox

    Ext.require([ 'Ext.window.MessageBox', 'Ext.tip.*' ]); Ext.onReady(function(){ Ext.MessageBox.confir ...

  5. Ext.MessageBox的用法

    1.Ext.MessageBox.alert()方法 有四个参数:alert( title , msg , function(){} ,this) 其中title,msg为必选参数,function为 ...

  6. ExtJs4 笔记(6) Ext.MessageBox 消息对话框

    本篇演示消息对话框的用法,ExtJs封装了可能用到的各类消息框,并支持自定义的配置. 如下是用到的html: [html] <h1>各种消息框</h1> <div id= ...

  7. 【编程技巧】Ext.MessageBox 大集合 不同的dialog图解加写法

    1.alert对话框 效果图: function a1(){ Ext.MessageBox.alert('title','text');  } 2.confirm案例,确定不确定2个按钮对话框 效果图 ...

  8. 实用ExtJS教程100例-005:自定义对话框Ext.MessageBox.show

    我们对ExtJS对话框进行了三篇演示: MessageBox的三种用法 进度条对话框Ext.MessageBox.progress 等待对话框Ext.MessageBox.wait 通过上面三篇内容的 ...

  9. 94. Ext.MessageBox消息框

    转自:https://www.cnblogs.com/libingql/archive/2012/03/30/2426198.html Ext JS消息提示框主要包括:alert.confirm.pr ...

随机推荐

  1. java.el.PropertyNotFoundException解决方法

    今天在开发中遇到了java.el.PropertyNotFoundException异常,检查JSP页面.Action.Bean.都没有发现错误 在网上搜了一下可能是我的bean不是一个标准的bean ...

  2. Android Gradle配置

    解决问题 错误: Could not find the AndroidManifest.xml file, going up from path //打开app build.gradle文件加入以下代 ...

  3. ThinkPHP实现导出

    刚开始做项目的时候,遇到了这个需求.说实话,对于一个才出来实习的菜鸟,而且还是才接触PHP的菜鸟而言,实在是有心杀敌,无力回天啊. 最简单的方法,就是网上找一个插件,然后一个本来就十几兆的项目,又增加 ...

  4. IOS 特定于设备的开发:获取额外的设备信息

    sysctl()和sysctlbyname()允许获取系统信息.这些标准的UNIX函数用于询问操作系统有关硬件和OS的详细信息. 这些常量使你能够检查核心信息,比如系统的CPU频率,可用的内存量等.它 ...

  5. CSS3 旋转 太阳系

    参考https://www.tadywalsh.com/web/cascading-solar-system/ 首先 旋转有两种方式  一种是使用 transform-origin  另一种是tran ...

  6. CSS3自适应字体大小(vw vh)

    viewpoint css3提供了一些与当前viewpoint相关的元素,vw,vh,vmin, vmax等. “viewpoint” = window size vw = 1% of viewpor ...

  7. 将 SQL Server 实例设置为自动启动(SQL Server 配置管理器)

    本主题说明如何使用 SQL Server 配置管理器在 SQL Server 2012 中将 SQL Server 实例设置为自动启动. 在安装过程中,SQL Server 通常配置为自动启动. 如果 ...

  8. file_get_contents 超时设置

    <?php $ctx = stream_context_create( array( 'http' => array( 'timeout' => 1 //设置一个超时时间,单位为秒 ...

  9. objective-C Ⅱ

    objective-C Ⅱ      接第一讲 objective-c初识 一.oc中的数组:NSArray 定义: NSArray *arrayName=[NSArray arrayWithObje ...

  10. ubuntu12.04&15.04 安装lamp(12.04为主)

    ubuntu 12.04&15.04下安装lamp环境 注意:如果是ubuntu15.04下,apache2.4.10的话,直接在/etc/apache2/apache2.conf文件的后边直 ...