Basic JavaScript, Where do you find it?

Where you tend to find JavaScript:


In BODY: between the body tags:


it is also possible for the javascript to be in an external file that is referenced by the html document

Really basic JavaScript anatomy:

Small JavaScripts are usually functions:

Functions are triggered by their name, etc. For some possible ways to trigger a function to run, see some common ways to trigger JavaScript Functions.

When you are trying to figure out how a page with Javascript runs:

  1. find all the pieces of javascript
  2. identify functions and note their names
  3. find where each function is being triggered (so that it runs)
          - functions are usually triggered from somewhere in the body, and/or from lower down in the head