简体   繁体   中英

Waiting for a page to load and then displaying it, without an iframe?

Hey! Let's say I have a big application in one .html file. Another file, that should be pretty lightweight, is the "loader" page. The small file loads and then calls the big file while displaying something like "loading"...

I know I can use a hidden iFrame and unhide it on it's onload event. However, I don't like iFrames. So how could I do this without one? AJAX maybe? Any other way?

http://www.queness.com/post/328/a-simple-ajax-driven-website-with-jqueryphp

Gives exactly what you are suggesting? With a little loading div on ajaxRequest and closing it on ajaxSucces.

Could you have a container div with the css set to display:none; and then switch it to display:block; on the onload event.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM