JavaScript

 

An Introduction to JavaScript

JavaScriptJavaScript is a programming language that was designed for the web. Many people don’t understand that it is not the same as Java, the programming language. In fact, Java and JavaScript couldn’t be more different. Java is very complicated, JavaScript is not. Regardless of popular belief, it is not a condensed version of Java in any way. One has nothing to do with the other.

What’s more, it can be used to manipulate your webpages to perform a variety of functions. Some of the applications are purely functional, while others are just fun. In fact, you don’t have to know the language at all, because there are numerous scripts out there that you can simply grab and paste into your HTML code.

 
But at the same time, if you want the JavaScript to be effective, and to do what you want it to do, you do need to at least have a basic understanding of JavaScript, how it is written, and how it works. This tutorial will provide that information for you, starting with the very basics, and then working into a few advanced topics. A working knowledge of the basics is necessary.

You do not, however, need to know HTML to learn JavaScript. It does help, but it isn’t necessary since JavaScript doesn’t use HTML, even though it is used with HTML. You do need to know how to work with your HTML documents, however, because you will be pasting your scripts into the HTML code, and you will need to know where to place the JavaScript. You do not need to know any programming language to learn JavaScript. The entire concept and writing of JavaScript is really quite simple.

 

What Can I Do With JavaScript?

As stated earlier, you can use JavaScript to perform a variety of functions on your website. Some of the functions are just functional, while the others are more fun in nature, providing interactivity for your website visitors.

Face it. Nobody likes stale webpages that just sit there. They want to interact with them dynamically. JavaScript allows this to happen. JavaScript reacts to users actions in most cases. For instance, if the user moves their mouse over some text or a graphic, JavaScript can perform a rollover and make that graphic or text change to something else.

JavaScript can provide functionality, such as password protection, browser detection, or display information, such as the correct time and date on a webpage. It can be used to give the website designer more control over a user’s browser, and how that browser sees the webpages. There are literally millions of things one can do with this powerful language.

What Do I Need To Write JavaScript?

Your own web browser must support JavaScript. If it doesn’t, you won’t be able to tell if your scripts work. However, this shouldn’t be a problem as most browsers do.

You can write your JavaScript using any plain text editor, or you can write them directly into your HTML documents. It is of course better to use a plain text editor so that you don’t accidentally mess up any of your HTML coding. An example of a plain text editor is Microsoft’s Notepad.

The only other thing that is required to write this language is a working knowledge of JavaScript, which you will have as you work through this tutorial!

 
This concludes the JavaScript Introduction. You’re now ready to move on to the JavaScript tutorial.