Explore Studios

Introduction to Javascript

by Bob Stone on Jul.29, 2009, under General Webmaster

Javascript is a useful tool for many webmasters, allowing them to create applets that can perform a wide variety of different functions. Javascript is a fairly advanced technique, however, and isn’t recommended for beginners who don’t have programming experience. It is based in part on the high level programming language known as Java. You should be fully proficient in more basic web design tools such as HTML and CSS before thinking about learning Javascript. Whenever you try to find a web designer, make sure they have an excellent knowledge of Javascript.

The first thing that you need to do before adding some Javascript is prepare the browser to read the script. This is done by using the script tag, the basic form is as follows:

<script type=”text/javascript>

This lets the browser know to expect some Javascript code. Without this, it would try to interpret the code as HTML and nothing useful would happen. Of course, once the script is done, you must close the tag with </script>.

Once you’ve initialized the script, you need to run some commands. There are hundreds of different Javascript commands with a wide variety of different functions. The simplest example is a simple script that writes some text on the page. The command to do this is as follows:

document.write(“Enter your text here!”);

Technically, this is known as calling a method. In this case, you’re calling the method “write” of the object “document,” which results in whatever text you like being written to the document in question – in this case a web page. That’s the most basic functionality of Javascript. Taking the time to learn the script fully will provide you with many powerful tools.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...