Where to put javascript in the HTML page? Header or body?

Discussion in 'Javascript' started by Nasser M. Abbasi, Apr 3, 2010.

  1. Nasser M. Abbasi, Apr 3, 2010
    #1
    1. Advertising

  2. Nasser M. Abbasi

    rf Guest

    "Hans-Georg Michna" <> wrote in message
    news:p...
    > On Sat, 3 Apr 2010 00:57:31 -0700, Nasser M. Abbasi wrote:
    >
    >>According to
    >>
    >>http://www.w3schools.com/js/js_whereto.asp


    In addition to what Hans-Georg has so admirally pointed out: Don't believe
    many of the things that W3schools says. The site is full of errors.
     
    rf, Apr 3, 2010
    #2
    1. Advertising

  3. rf wrote:
    > "Hans-Georg Michna" <> wrote in message
    > news:p...
    >> On Sat, 3 Apr 2010 00:57:31 -0700, Nasser M. Abbasi wrote:
    >>
    >>> According to
    >>>
    >>> http://www.w3schools.com/js/js_whereto.asp

    >
    > In addition to what Hans-Georg has so admirally pointed out: Don't believe
    > many of the things that W3schools says. The site is full of errors.


    Obvious, glaring errors.

    THe FAQ used to contain w3schools links. THere was a long time nagging
    request to remove these links. I cannot recall any complaints when that
    request was fulfilled.
    --
    Garrett
    comp.lang.javascript FAQ: http://jibbering.com/faq/
     
    Garrett Smith, Apr 3, 2010
    #3
  4. Nasser M. Abbasi

    David Mark Guest

    Nasser M. Abbasi wrote:
    > According to
    >
    > http://www.w3schools.com/js/js_whereto.asp
    >
    > it says:
    >
    > "Put your functions in the head section, this way they are all in one place,
    > and they do not interfere with page content."
    >
    > But according to
    >
    > "High Performance JavaScript (Paperback) by Nicholas C. Zakas"
    >
    > http://www.amazon.com/High-Performa...ooks&qid=1270279493&sr=1-37#reader_059680279X
    >
    > on page 3 it says:
    >
    > "it's recommended to place all <script>tags as close to the bottom of the
    > <body> tage as possible"
    >
    >


    Both generalizations are wrong. :)
     
    David Mark, Apr 3, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dhanasankar S via DotNetMonster.com

    How to read the BODY of HTML file from another HTML file using javascript?

    Dhanasankar S via DotNetMonster.com, Feb 26, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    487
    =?Utf-8?B?dHBlcnJp?=
    Feb 28, 2005
  2. mlt
    Replies:
    2
    Views:
    880
    Jean-Marc Bourguet
    Jan 31, 2009
  3. London Boy
    Replies:
    2
    Views:
    344
    Keith Bowes
    Jan 12, 2004
  4. Replies:
    5
    Views:
    219
    A. Sinan Unur
    Sep 8, 2005
  5. Replies:
    4
    Views:
    171
    Gomolyako Eduard
    Oct 18, 2005
Loading...

Share This Page