Re: right javascript syntax
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: right javascript syntax

From: [on] <switchable@gmail.com>
Date: Mon Apr 03 2006 - 16:34:07 CEST

korund@hotmail.com wrote:
> Thanks. Is there any difference to fire code via window.onload = init;
> located inside <head> tags, or via <body onload="init();"> ? What from
> methods will call code faster?
> The page will contain image, that need be loaded.

Shouldn't be any difference, both basically tells the client to run the
function when the page is finnished loaded (all imageas and whatnot).

It all depends on where you want the code, that runs the function, to
be.
Received on Mon May 1 04:38:25 2006