Javascript - The Basics
by Kurt Maine
Javascript is a fairly powerful scripting language that unfortunately, usually either gets underused, or WAY overused. For those of you not familiar with Javascript (referred to as "JS"), you usually see it used in the visual sense .. image fading, count-downs, etc. You should familiarize yourself with the Javascript keywords like: Variables, Event Handlers, If/Then Statements.
Javascript code is typically embedded into an HTML document using the script tag, you accomplish this by using the following code:
<script language="Javascript">
<!--
document.write("Binary Invisions is excellent..");
//-->
</script>
The language attribute isn't required, but in using it, you tell a browser "If you don't have this version of JS, then don't execute this code.". Example:
<script language="Javascript1.1">
I'll cover one last thing, the SRC attribute. It is used to link to an offpage javascript file to be executed as code on that paticular page. Example:
<script language="Javascript" src="whaibowpwns.js">
</script>
More advanced writings on Javascript (and other topics) can be found at the Binary Invisions Community forum. A link is conveniently located in my signature.
