Unlike other programming languages, Javascript does not require the student to buy any special software. Everything you need is included in your operating system. These things are:
That's all!
So since you have these let's jump right in.
Open your text editor and type in the following:
<HTML>
<BODY>
<SCRIPT TYPE="text/javascript">
</SCRIPT>
</BODY>
</HTML>
Every Page you write using Javascript will look much like this. (This is
all HTML code and we won't dwell too much on that part. If you want to know more about HTML
here is one of many resources on the internet
that explain it.)
The actual Javascript will be between the <SCRIPT TYPE="text/javascript">
and the </SCRIPT>. So between those two lines type:
document.write("Hello World!")
Now save the file as 1p.htm (or whatever you want.)
Open the file in your web browser.
Or click here:Code
If you happened to type DOCUMENT.WRITE instead of document.write you would
not have seen Hello World! on your screen. That is because Javascript is CASE SENSITIVE or
in other words it does matter whether you use upper or lower case so always be careful to
copy the code exactly. (You can even cut-and-paste if you want.)
The last thing I want to be sure you know is that you can see how other people use
Javascript by viewing the web page source code. In Firefox you click on VIEW in the menu
bar, then choose Page Source or just press ctrl-U. Try it now by opening your page again
and viewing the page source.
Click Here for some variations to try,
then experiment on your own.