ExtJs -- 03 -- several progress bar codes. You can see extjs -- 03 -- progress bar.
/** // Complete the progress bar at a fixed time, that is, the pseudo progress bar Ext. onReady (function () {var progressBar = Ext. msg. show ({title: "progress bar", msg: "Progress completed by fixed time", width: 300, wait: true, waitConfig: {interval: 500, duration: 5000, fn: function () {Ext. msg. hide () ;}}, closable: false}) ;}); * // ** // progress bar // updateProgress (Number value, String progressText, String msg) parameter description: value: Any Number between Number 0 and 1 (0 by default) progressText: display content in the String progress bar Confirm '') msg: the message body content of the String message box is replaced by the specified message (not defined by default) Ext. onReady (function () {var configs = {title: "installation progress bar", progress: true, width: 600, closable: false, msg: "installing... "}; Ext. msg. show (configs); var fn_progressbar = function (v) {return function () {if (v = 12) {Ext. msg. hide ();} else {var I = v/11; Ext. msg. updateProgress (I, Math. round (I * 100) + "% completed! ", I) ;}}for (var I = 1; I <13; I ++) {setTimeout (fn_progressbar (I), I * 500 );}}); * // ** Ext. onReady (function () {var msgBox = Ext. messageBox. show ({title: 'hprompt ', msg: 'dynamically updated progress bar and information text', modal: true, width: 300, progress: true}) var count = 0; // number of times the scroll bar is refreshed var percentage = 0; // progress percentage var progressText = ''; // progress bar information var task = {run: function () {count ++; // computing progress percentage = count/10; // generate progress bar text progressText = 'current completion degree: '+ Percentage * 100 + "%"; // The message update dialog box msgBox. updateProgress (percentage, progressText, 'current time: '+ Ext. util. format. date (new Date (), 'Y-m-d g: I: s A'); // close the information prompt box if (count> 10) after 10 refresh) {Ext. taskManager. stop (task); msgBox. hide () ;}, interval: 1000} Ext. taskManager. start (task) ;}); */Ext. onReady (function () {Ext. messageBox. SS ("Please wait", "Data Processing progress... "); var fun = function (p) {return function () {if (p = 20) {Ext. mes SageBox. hide ();} else {Ext. messageBox. updateProgress (p/20, 'processing '+ p +', a total of 20 ') ;};}for (var I = 1; I <= 20; I ++) {setTimeout (fun (I), I * 1000) ;}}); <pre name = "code" class = "javascript"> Ext. onReady (function () {var configs = {title: "data loading progress", msg: "processing data... ", animate: true, width: 500, progress: true, closable: false, fn: function () {Ext. msg. alert ("title information", "Prompt User information") ;}}; Ext. msg. show (configs); var fn_progres Sbar = function (v) {return function () {if (v = 99) {Ext. msg. hide (); Ext. msg. alert ("prompt message", "Do we continue roaming? ");} Else {var I = v/98; Ext. Msg. updateProgress (I," completed "+ Math. round (I * 100) +" %! ") ;}}For (var I = 1; I <100; I ++) {setTimeout (fn_progressbar (I), I * 100 );}});