夢(mèng)幻之旅

          DEBUG - 天道酬勤

             :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            671 隨筆 :: 6 文章 :: 256 評(píng)論 :: 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世界你好,這是我的第一個(gè)Ext程序!</font>", callBack);
              
          function callBack(id) {
                  alert(
          "你點(diǎn)擊的ID是:" + id);
              }

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

          }
          ;
          function wateE() {
              Ext.Msg.wait(
          "等待時(shí)間長(zhǎng)的操作""提示"{
                          text : 
          "進(jìn)度條上的文字"
                      }
          )
          }

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

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

                              
          // msgBox.updateText("時(shí)間:"+new Date().format('Y-m-d g:i:s
                              // A'));
                              msgBox.updateProgress(count / 100"還剩" + (100 - count)
                                              
          + "秒關(guān)閉窗口""當(dāng)前時(shí)間:"
                                              
          + 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 閱讀(1228) 評(píng)論(0)  編輯  收藏 所屬分類: EXT
          主站蜘蛛池模板: 松阳县| 禹州市| 开原市| 老河口市| 易门县| 天等县| 涞水县| 淮滨县| 库伦旗| 宝清县| 胶州市| 康保县| 昔阳县| 盖州市| 长丰县| 磐安县| 奇台县| 威宁| 安图县| 福州市| 花莲市| 巴南区| 三台县| 孙吴县| 旅游| 社旗县| 池州市| 大化| 星座| 拜城县| 霞浦县| 涿鹿县| 永福县| 山西省| 镇平县| 凤凰县| 盈江县| 吉木萨尔县| 涟水县| 张家界市| 西贡区|