JavaScript Production Progress Bar This article will detail the application of two types of schedules to apply JavaScript and package core code. Put in percent.js
/ ** * Draw a simple percentage progress bar * Barid progress bar span ID * Fpercent completed percentage * STRCAPTION Title * Iheight Height * IUNIT Minimum unit * BGColor Background Color * Border Border Style * Cursor Cursor Style * / Function Simplepercent (Barid, Fpercent, Strcaption, Iheight, IUNIT, BGCOLOR, BORDER, CURSOR) {var PBAR = Document.all (Barid); if (PBAR) {PBAR.TITLE = STRCAPTION FPERCENT "%"; PBAR.INNERHTML = ""; if (BGCOLOR) {PBAR.Style.BackgroundColor = BGCOLOR;} if (border == null) {border = "1px solid # 000000";} PBAR.Style.Border = Border; if (cursor == null) {cursor = " PBAR.Style.cursor = CURSOR;
IHEIGHT == NULL || IHEIGHT <1) {Iheight = 1;} PBAR.Style.Height = IHEIGHT "PX"; if (IUnit == Null || IUnit <1) {iUnit = 1;} PBAR. Style.Width = (IUNIT * 100) "PX"; PBAR.INSERTADJACENTHTML ("Beforeend", " span> ");
}} Example:
span>