简体   繁体   English

等待页面加载然后显示它,没有iframe?

[英]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. 假设我在一个.html文件中有一个很大的应用程序。 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. 我知道我可以使用隐藏的iFrame并取消隐藏它的onload事件。 However, I don't like iFrames. 但是,我不喜欢iFrames。 So how could I do this without one? 那我怎么能没有一个呢? AJAX maybe? AJAX可能吗? Any other way? 还有其他方法吗?

http://www.queness.com/post/328/a-simple-ajax-driven-website-with-jqueryphp 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. 在ajaxRequest上加载一点div并在ajaxSucces上关闭它。

Could you have a container div with the css set to display:none; 你有一个容器div,css设置为display:none; and then switch it to display:block; 然后将其切换为display:block; on the onload event. 在onload事件上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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