onload function

Discussion in 'JavaScript' started by indumathi, Nov 11, 2008.

  1. indumathi New Member

    hi all,

    is it wise to use onload in body tag? for ex: <body onload="sample()" >

    and will it affect the other js already included in a page?

    and will the jss and css load when the page loads?

    thnks,
    indu
  2. ishkey Mod - Designer

    Sure - The browser triggers "onLoad" when the document is finished loading.
    No it will not affect the other "js" on the page.
    The "css" is call first, followed by those "js" encased in the "head section", followed by the body.
    Go for it.