|| Web Start Help ||

HTML Final Lessons. JavaScript.

Time to learn some basic scripting.

Here I show you how to create a button or a link that runs a browser script (specifically JavaScript).

Cool stuff, but it won't do anything until we write the script. Here we go....

Here is the working sample:


Click me to see the scrip in action.

Notice that the script must be placed inside the <head> tags. It will also be nested between <script> tags.


JavaScript can do almost anything controlled by the browser, which can be history navigation, mathematical calculations, and changing elements on the page.

Here is the code in action:

Click to see 2 times 3.


Note that you can add comments in JavaScript using //. The entire line will be a comment, and only that one line.

You cannot use reserved words for your function names. Here is a list of reserved words.

When calling a function, you can pass values inside the (). These values can be predefined, like in my example, or they can be variables.

Elements on your page can be identified by JavaScript. The easiest way is to give the element an ID, and then reference the ID.

Continue Learning