what is the difference ?

Results 1 to 3 of 3

Thread: what is the difference ?

  1. #1
    swami Guest

    Default what is the difference ?

    Some times we write a script in &#060;head&#062;...&#060;/head&#062;,<BR>And some times we write script in &#060;body...&#060;/body&#062;.<BR>Is there any difference between writing Scripts in different places?<BR><BR>thx

  2. #2
    Rae Guest

    Default RE: what is the difference ?

    See http://www.w3scripts.com/js/js_whereto.asp<BR><BR>You can see from this that any script in the head has to be called to be run (therefore it&#039;s perfect for listing functions that you call upon in the body). <BR><BR>Anything in the body is run straight away at load time.

  3. #3
    Join Date
    Dec 1969

    Default RE: what is the difference ?

    Page 44 of Wrox "Instant Javascript" explains it well.. basically it doesn&#039;t matter too much (cept to declare functions before they are called).. Just style and conformity..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts