延迟查看文档 [英] Delaying viewing of the document

查看:86
本文介绍了延迟查看文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用JavaScript修改已加载文档的某些文本部分。

函数从标题中的文件加载并运行:


< body onLoad =" ...">


根据Venkman配置文件,脚本总共运行170

毫秒。但是,当我加载页面时,我可以看到原始表格

的文档(原始文本),我可以观察文本的变化。那么

有没有办法阻止浏览器显示文件,直到

脚本完成?


谢谢。


I am using JavaScript to modify some text parts of a loaded document. The
functions are loaded from a file at the header and run by:

<body onLoad="...">

According to the the Venkman profile the scripts run in a total of 170
milliseconds. However, when I load the page I can see the original form
of the document (original text) and I can observe the text change. So is
there a way to block the browser from displaying the document until
scripts are done?

Thanks.

推荐答案

" pembeci" < PE ***** @ cs.jhu.edu> skrev i meddelandet

news:22 ****************************** @ localhost.ta lkaboutprogramming。 com ...
"pembeci" <pe*****@cs.jhu.edu> skrev i meddelandet
news:22******************************@localhost.ta lkaboutprogramming.com...

我使用JavaScript来修改已加载文档的某些文本部分。
函数从标题中的文件加载并运行:

< body onLoad =" ...">

根据脚本运行的Venkman配置文件总共170毫秒。但是,当我加载页面时,我可以看到文档的原始格式(原始文本),我可以观察文本的变化。那么有没有办法阻止浏览器显示文档直到
脚本完成?

I am using JavaScript to modify some text parts of a loaded document. The
functions are loaded from a file at the header and run by:

<body onLoad="...">

According to the the Venkman profile the scripts run in a total of 170
milliseconds. However, when I load the page I can see the original form
of the document (original text) and I can observe the text change. So is
there a way to block the browser from displaying the document until
scripts are done?




拥有< body>开始时是不可见的(使用CSS),然后在剧本结尾处使它成为可见的


(那些关闭了JS的人根本看不到任何东西然后,当然)


Joakim Braun



Having the <body> invisible to begin with (using CSS), then making it
visible at the end of the script?
(those with JS turned off won''t see anything at all then, of course)

Joakim Braun




我试过这个但是不能让它工作:


< body onload =" loadAll(); all.display ='''';">

< div id =" all" style =" display:none">


我可以像这样访问''all'吗?

其次,我要设置什么才能显示它可见吗?


谢谢。


I tried this but couldn''t get it work:

<body onload="loadAll(); all.display='''';">
<div id="all" style="display:none">

Can I access ''all'' like this?
Secondly, what shall I set display to make it visible?

Thanks.


我的意思是all.style.display =''''

I mean all.style.display='' ''


这篇关于延迟查看文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆