Use JavaScript to calculate the number of currently loaded images.
Principle:
First define an array of images, and then calculate it through the onload event of the image. Note that onload is different in IE and Firefox.
Finally, a progress bar is needed to combine with it.
This script is often used in games.
Demo: