夢幻之旅

          DEBUG - 天道酬勤

             :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            671 隨筆 :: 6 文章 :: 256 評論 :: 0 Trackbacks
          Ext.BLANK_IMAGE_URL = "/learn/ext/resources/images/default/s.gif";
          function alertE() {
              Ext.Msg.confirm(
          "<font size='4'>提示</font>",
                      
          "<font color='red'>ExtJs世界你好,這是我的第一個Ext程序!</font>", callBack);
              
          function callBack(id) {
                  alert(
          "你點擊的ID是:" + id);
              }

          }
          ;
          function promptE() {
              Ext.Msg.prompt(
          "<font size='4'>輸入</font>",
                      
          "<font color='red'>ExtJs世界你好,這是我的第一個Ext程序!</font>", callBack, this,
                      
          true);
              
          function callBack(id, msg) {
                  alert(
          "你點擊的ID是:" + id + ",消息:" + msg);
              }

          }
          ;
          function wateE() {
              Ext.Msg.wait(
          "等待時間長的操作""提示"{
                          text : 
          "進度條上的文字"
                      }
          )
          }

          function showE() {
              Ext.Msg.buttonText.yes 
          = "保存";
              Ext.Msg.buttonText.no 
          = "清除";
              
          var msgBox = Ext.Msg.show({
                          title : 
          "提示",
                          msg : 
          "自我介紹一下,我是HuyVanpull哈!!",
                          modal : 
          true,
                          prompt : 
          true,
                          value : 
          "請輸入內容..",
                          progress : 
          true,
                          progressText : 
          "保存進度0%",
                          buttons : Ext.Msg.YESNOCANCEL,
                          fn : callBack
                      }
          )
              
          function callBack(id, msg) {
                  alert(
          "按鈕的ID是:" + id + ",內容:" + msg);
              }

              
          var count = 0;
              Ext.TaskMgr.start(
          {
                          run : 
          function() {
                              count
          ++;
                              
          if (count > 100{
                                  msgBox.hide();
                              }

                              
          // msgBox.updateText("時間:"+new Date().format('Y-m-d g:i:s
                              // A'));
                              msgBox.updateProgress(count / 100"還剩" + (100 - count)
                                              
          + "秒關閉窗口""當前時間:"
                                              
          + new Date().format('Y-m-d g:i:s A'));
                          }
          ,
                          interval : 
          1000
                      }
          )
          }

          function progressBarE1() {
              
          var ProgressBar = new Ext.ProgressBar({
                          text : 
          "working",
                          width : 
          300,
                          applyTo : 
          "ProgressBar"
                      }
          );
              
          var count = 0;
              
          var percentage = 0;
              
          var progressText = "";
              Ext.TaskMgr.start(
          {
                          run : 
          function() {
                              count
          ++;
                              
          if (count > 100{
                                  ProgressBar.hide();
                              }

                              percentage 
          = count / 100;
                              progressText 
          = percentage * 100 + "%";
                              ProgressBar.updateProgress(percentage, progressText)
                          }
          ,
                          interval : 
          1000
                      }
          )
          }

          function progressBarE2() {
              
          var ProgressBar = new Ext.ProgressBar({
                          text : 
          "working",
                          width : 
          300,
                          applyTo : 
          "ProgressBar"
                      }
          );
              ProgressBar.wait(
          {
                          duration : 
          100000,
                          interval : 
          10,
                          increment : 
          1000,
                          scope : 
          this,
                          fn : 
          function() {
                              alert(
          "更新完畢");
                          }

                      }
          )
          }

          Ext.onReady(progressBarE2);
          posted on 2008-12-28 14:21 HUIKK 閱讀(1219) 評論(0)  編輯  收藏 所屬分類: EXT
          主站蜘蛛池模板: 昌宁县| 乌鲁木齐市| 崇阳县| 河间市| 江达县| 射阳县| 葵青区| 南康市| 定安县| 黄山市| 宾川县| 望都县| 周宁县| 随州市| 赣州市| 长乐市| 南靖县| 枣强县| 资讯 | 泗洪县| 麻阳| 马关县| 甘洛县| 寻乌县| 靖宇县| 明星| 洞口县| 抚顺县| 筠连县| 佛冈县| 德安县| 肃宁县| 吴旗县| 江都市| 阜城县| 铜山县| 陇南市| 清水河县| 尉氏县| 定安县| 涿鹿县|