Home » » An Introduction to JavaScript

An Introduction to JavaScript

Introduction

JavaScript is a programming language that was designed for the web. Many people don't understand that JavaScript 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, JavaScript is not a condensed version of Java in any way. One has nothing to do with the other.

JavaScript 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 any JavaScript 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. JavaScript 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 JavaScript.

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. Newer versions of both Microsoft Internet Explorer and Netscape both support JavaScript.

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 JavaScript is a working knowledge of JavaScript, which you will have as you work through this tutorial!
Share this article :

0 comments:

Post a Comment

 
Copyright © Online Business - All Rights Reserved
Proudly powered by Blogger