The progress bar is displayed when the page is loaded in the ASP.NET web application, although it is a false force bar, it cannot reflect the load scheme in real time, but can tell the user page is being loaded, so as to avoid the user's mistakes, the system is faulty or crash. Create a new Web project, add 4 files: default.htm; progress bar.aspx; second.aspx; common.css. The default.htm page has a chain. After clicking, load the propx, load second.aspx after loading, because the second.aspx simulates the big page, so the main thread is hangs for 10 seconds, and the schedule page is still displayed ProgressBar. .aspx.
The code is as follows: Default.htm
PGBValue '%'; // Change the label value} if (pgbobj = document.getlementByid (pgbid)) {var Divchild = pgbobj.children [0]; pgbobj.children [0] .style.Width = PGBVALUE "%%%%%%%% ";} WINDOW.STATUS =" Data Read " PGBValue "%, please wait ... ";} if (pgbvalue == 100) window.status =" Data reading has been completed ";} Function Showbar ) {SetPGB ('pgbmain', i); i ;} script> head>
New Post(0)
|