Uses for JavaScript?

The most common use for JavaScript is:

  • Form validation or manipulation.
  • It offer's web designers a way to validate a form's correctness before the page is submitted to a server. This function is particularly well suited to save the server from extra processing.
  • JavaScript can perform a multitude of tasks such as
    • opening new windows,
    • generating text,
    • identifying the user's web browser,
    • and manipulating styles.
  • JavaScript is found on most advanced web sites due to its extreme usefulness for providing interactive web pages.

Where to execute JavaScript

JavaScript can be executed from both the Head and Body sections of an HTML document. Tthe Internet browser will read the HTML and interpret the JavaScript when is finds a script element. When JavaScript is placed in the body section, it is executed when the html document is loaded. When placed in the head section. it is executed when triggered by an event such as clicking your mouse.






about - javascript