JavaScript is a computer programming language. The most common use of JavaScript is as code embedded in HTML (web) pages.

Unlike PHP and other server side languages JavaScript code can run locally in your browser. This means you can learn and practice writing Javascript code on just about any computer whether or not it is connected to the internet. You don't need to buy any software and you don't have to set up a local file server. All you need is a text editor and a browser.

JavaScript Example

If you copy the text below into a text editor and then save it as "anything.html" and then double click on the file you've saved it should open up your web browser and display the numbers 1 to 10 separated by commas. It is that easy to create a web page containing JavaScript!

<!DOCTYPE html>
<meta charset="utf-8">
<title>JavaScript Example</title>

<span id="text"></span>

var j;
var output;

output=output+j+", ";

document.getElementById ("text").innerHTML=output;

Local Government & Municipal Knowledge Base

Many of the HTML snippets embedded in pages throughout this site contain JavaScript.

Related Pages


The following site members have contributed to this page:

External Links & References

  1. Wikipedia
  2. Google Search
  3. w3schools
  4. Siftery - List of companies that use Javascript
  5. Javascript Tutorials for Beginners
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License