Site hosted by Angelfire.com: Build your free website today!
Contents

* Getting started
* What are CSS?
* Some CSS tricks
* CSS cautions
- What is JavaScript?
* Some JavaScript tricks
* JavaScript cautions

[Home]
JavaScript is a scripting language developed by Netscape to add interactivity and power to web documents. Those nifty alerts, clocks, and image rollovers are all made with JavaScript. The beautiful thing about JavaScript is that it's easy as pie. You don't need to be a programmer to be able to master it, it has a simle enough syntax, but you do need to have HTML experience before you begin to learn it. You could theoretically learn it from scratch, but you would have no use for it :).

I will not attemt to teach you JavaScript here, because that would mean I'd have to commit myself to helping you with code once you start learning, and I don't have that kind of time. I have included a few simple JavaScripts for you to use on your pages if you want to, along with explanations.
The only thing I am going to show you about general JavaScript here is how to embed it into your document [so that you understand the tricks I provided later on]. A JavaScript function is usually embedded in the HEAD section of a HTML document, and then called upon from the BODY section. To embed JavaScript code, you must type this first:
<SCRIPT LANGUAGE="JavaScript" TYPE="">
<!-- hide
~your code goes here~
//end hiding-->
</SCRIPT>
What's with that hide business? Well, some browsers [discussed in the Cautions section] do not understand JavaScript. The tags <!-- and //--> basically mask your JavaScript code, making it appear as a SGML comment, which no browser will show on the screen. If you don't use them, WebTV, for example, will show your code on the page [not exactly aesthetic, is it?] :)

Let me make one thing clear before you move on. JavaScript is not Java. Java is a compiled language - it is put into machine language before it gets to your computer. JavaScript is an interpreted language - put into machine language on your computer. The coding in JavaScript is somewhat similar to Java but it is much less restrictive. For example, JavaScript allows you to assign any type of value to your variables. Java does not. Java is a language that experienced programmers use to develop applications. The name of JavaScript is the result of Netscape's agreement with Sun Microsystems, the developer of Java [JavaScript was originally called LiveScript]. IMHO, they should not have changed the name, because I wouldn't have to type all this in right now if JavaScript's name differed a lot from Java's :) Well, on to the tricks.

[Previous page] [Next page]