像'onbeforeload'这样的命令? [英] Such a command as 'onbeforeload'?

查看:82
本文介绍了像'onbeforeload'这样的命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个javascript弹出窗口,我希望在其余的

页面加载之前发生。这是人们在阅读相当沉重的页面时阅读的内容。


我尝试使用''onbeforeload'而不是''在Body标签中加载'',但是

根本没有弹出。


有什么想法吗?

谢谢。

解决方案

11月14日下午2:33,CJS < a ... @ anon.comwrote:


我有一个javascript弹出窗口我希望在剩下的
$ b之前发生$ b页面加载。这是人们在阅读相当沉重的页面时阅读的内容。


我尝试使用''onbeforeload'而不是''在Body标签中加载'',但是

根本不会弹出。



我没有看到这样的事件。但是你想要完成什么?

也许有办法通过另一条道路做你需要的东西。


On 11月14日下午2:48,nolo contendere< simon.c ... @ fmr.comwrote:


11月14日下午2:33, CJS" < a ... @ anon.comwrote:


我有一个javascript弹出窗口我希望在剩下的
$ b之前发生$ b页面加载。人们可以阅读相当重的页面

加载它。


我尝试在Body标签中使用''onbeforeload''而不是'onload'',但它是

那时候根本不会出现。



我没有看到这样的事件。但是你想要完成什么?

也许有办法通过另一条道路来做你需要的事情。



这是未经测试的,但可能满足您的需求。

http://www.codingforums.com/showthre...threadid=15203

11月14日下午2:33,CJS < a ... @ anon.comwrote:


我有一个javascript弹出窗口我希望在剩下的
$ b之前发生$ b页面加载。这是人们在阅读相当沉重的页面时阅读的内容。


我尝试使用''onbeforeload'而不是''在Body标签中加载'',但是

根本没有弹出。


有什么想法吗?


您可以在div(style =" display:block;")中显示某种加载器(图像,txt,

等)开始,将您的内容放在

div(style =" display:none;")和onload中,调用一个函数设置

要显示的加载器div: none和要显示的内容div:块。


Hi, I have a javascript popup which I want to happen BEFORE the rest of the
page loads. It''s something for people to read while quite a heavy page
loads behind it.

I tried using ''onbeforeload'' instead of ''onload'' in the Body tag, but it
doesn''t pop up at all then.

Any ideas?

Thanks.

解决方案

On Nov 14, 2:33 pm, "CJS" <a...@anon.comwrote:

Hi, I have a javascript popup which I want to happen BEFORE the rest of the
page loads. It''s something for people to read while quite a heavy page
loads behind it.

I tried using ''onbeforeload'' instead of ''onload'' in the Body tag, but it
doesn''t pop up at all then.

I didn''t see such an event. But what are you trying to accomplish?
Perhaps there is a way to do what you require via another path.


On Nov 14, 2:48 pm, nolo contendere <simon.c...@fmr.comwrote:

On Nov 14, 2:33 pm, "CJS" <a...@anon.comwrote:

Hi, I have a javascript popup which I want to happen BEFORE the rest of the
page loads. It''s something for people to read while quite a heavy page
loads behind it.

I tried using ''onbeforeload'' instead of ''onload'' in the Body tag, but it
doesn''t pop up at all then.


I didn''t see such an event. But what are you trying to accomplish?
Perhaps there is a way to do what you require via another path.

This is untested, but may serve your needs.

http://www.codingforums.com/showthre...threadid=15203


On Nov 14, 2:33 pm, "CJS" <a...@anon.comwrote:

Hi, I have a javascript popup which I want to happen BEFORE the rest of the
page loads. It''s something for people to read while quite a heavy page
loads behind it.

I tried using ''onbeforeload'' instead of ''onload'' in the Body tag, but it
doesn''t pop up at all then.

Any ideas?

You could start off by showing a loader of some sort (image, txt,
whatever) in a div (style="display: block;"), with your content in a
div (style="display: none;"), and onload, call a function that sets
the loader div to display: none and the content div to display: block.


这篇关于像'onbeforeload'这样的命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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