You are here: Re: Looking for an event trigger « PHP Programming Language « IT news, forums, messages
Re: Looking for an event trigger

Posted by Chung Leong on 10/11/06 15:55

ASM wrote:
> Cleverbum@hotmail.com a écrit :
> > I'm hoping to execute some code "when the page has completely finished
> > loading" by which I mean the page and all the images on it, does anyone
> > know of a way to do this?
>
> <script type="text/javascript">
>
> function sthg() {
> document.body.style.background='orange';
> }
>
> onload = function() { sthg(); alert('all loaded'); };
> </script>
>
>
> does alert fires before all images loaded ?

No, onload for the document fires when the HTML file is loaded. Img
tags have their own onload handlers. AFAIK not events are emitted on
things like background images.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация