Simple one is to have a hidden div with this "loading", and you show this div immediately after you click the load button in javascript. Then when the request returns, the page will be refreshed to show the image. For better user experience, you have to go with AJAX.
【在 g*****g 的大作中提到】 : Simple one is to have a hidden div with this "loading", : and you show this div immediately after you click the load button : in javascript. Then when the request returns, the page will : be refreshed to show the image. : For better user experience, you have to go with AJAX.
b*u
4 楼
just use a animated gif
S*t
5 楼
how to switch to the real image after say 5 seconds when it is done? Can you show me an example javascript?
【在 b****u 的大作中提到】 : just use a animated gif
A*o
6 楼
google: javascript setTimeout() and setInterval()
【在 S*******t 的大作中提到】 : how to switch to the real image after : say 5 seconds when it is done? : Can you show me an example javascript?