Placing JavaScript in an HTML document
  • Head Section:
    • Embedded scripts that contain functions belong in the head section of the HTML document.
    • These script are loaded before the function is called by using an HTML event handlers.
    • The Script element used to the right reflects the proper syntax for a function. This type of script is embedded in the head section of the HTML document.

 

  • Body Section:
    • Script embedded in the body section of an HTML document does not use functions.
    • These scripts are executed when the HTML document is load.
    • The syntax shown to the right is the same as the syntax above without the function.
 
Imsg
Discussion

Blogging

E-mail

 

JAVASCRIPT    -    LESSON 3
JavaScript embedded