Share |




JavaScript

Using tutorial at Tizag.

From the Beginning

Let's review some JavaScript.

  • If JS is in the <body>, start with the HTML comment mark < - - and the js comment mark, / / followed by the HTML close comment. - - >
  • Multiline comments are /* to open and */ to close, also surrounded by < - - and - - >.
  • Statements are terminated by newline, ";" is required only if on the same line.
  • Put JS for events in the head section and or use an external file containing nothing but JavaScript and named with the ".js" extension.
  • The operators are standard.
  • The var operator is not required, only used as good practice.
  • Function declarations look like this
    jsFunction
    and are called like this: jsFunctionCall

Hello

JavaScript Enabled?

Next