S*******t 发帖数: 97 | 1 我有个servlet专门load image.不过通常这些image
都很大。我不希望用户一直等。如何在load image
的时候在页面上显示loading。。。然后load完了
以后直接转成image? thanks. |
g*****g 发帖数: 34805 | 2 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.
【在 S*******t 的大作中提到】 : 我有个servlet专门load image.不过通常这些image : 都很大。我不希望用户一直等。如何在load image : 的时候在页面上显示loading。。。然后load完了 : 以后直接转成image? thanks.
|
S*******t 发帖数: 97 | 3 能给一下有关AJAX这方面的link吗?
倒是写过一些AJAX authentication的东西
【在 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 发帖数: 1027 | |
S*******t 发帖数: 97 | 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 发帖数: 1550 | 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?
|