Home  >  Article  >  Web Front-end  >  When the web page is loading, the page displays a progress bar and displays the web page content after the loading is completed_javascript skills

When the web page is loading, the page displays a progress bar and displays the web page content after the loading is completed_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:45:571599browse

There are many web page loading progress bars on the Internet, but most of them have fixed time.
When querying a large amount of data below, the webpage loads slowly. When the webpage is loading, a progress bar is displayed. When the webpage is loaded, the progress bar disappears and displays the content of the webpage that has been loaded.

Copy code The code is as follows:



< body>
The progress bar is displayed here, and a dynamic picture can also be placed

The content actually displayed on the webpage




------------ ----------------------------------------
The easiest thing is to put pictures. After the web page is loaded, hide the image and display the web page content
Copy the code The code is as follows:



Loading...




--------------------- -------------------------------
Copy code The code is as follows:




Loading...