0 members and 582 guests
No Members online

» Site Navigation
» Stats
Members: 35,442
Threads: 103,075
Posts: 826,688
Top Poster: cc.RadillacVIII (7,429)
|
-
Well, we all want to learn about javascript and HTML don't we? Well here is a small guide to get you started.
First off, the easiest program to use to create pages would most likely be Word Pad. So open that up.
To start us off, we want to tell the program that it is using HTML so type in:
The "<" and ">" are signifying the start of a command or operation. This is also true if you use forums, except the < and >'s are replaced with [ and ]'s.
Next, the title of the page, or what is displayed on the top of the window. Can you guess how we start this off?
Now, type in what you want it to say, and end it with this:
The "/" is like a way of saying STOP to the operation it was following before. Once again, this is true to forums. Here is an example of what we have so far, or what I have right now:
Code:
<HTML>
<title>Introduction To Javascript</title>
Side Note: You don't actually need all of the enters, and different lines, it can all be typed out in one line, but this makes it much easier.
Now we want the head codes, or the Header of our document. By now, you should have figured out how we start this off:
This is going to be the fun part for now, we want to tell the program to do a function, and as with all of the operations we have done before, we are going to want it start of with the < and end with a >. We are going to make the title scroll across the page.
Code:
<head><marquee>Wee, I am learning Javascript</marquee></head>
End the marquee function, and the head function as shown above.
Now comes the more complicated part, the REAL javascript. We have to tell the explorer what language we are going to be using, which will be javascript. This is an example of what we have so far, as well as the javascript begin.
Code:
<HTML>
<title>Intrduction To Javascript</title>
<head><marquee>Wee, I am learning Javascipt</marquee></head>
<script language="Javascript">
Side Note: You can change the text that it says if you want, I am just using these for the tutorials.
We are going to learn one of the most basic things you can learn with javascript, alerts. Since we are in Javascript now since we started the javascript function, not everything we do will require the < and >'s. To start off, lets type in alert.
That one word alone is not going to do anything, so we have to tell it to say something. We start this off with an open parentheses, "(", and Quotation marks. When in javascript, all text that will be displayed will have to be in quotes. Otherwise, the explorer will try to use it as a command. After you type in what you want, and end it with quotations, we have to end the parenthesis with a close parentheses, ")". And to finish off the line, end it with a semi-colon. The semi-colon is saying "Hey, we are finished with this line, move onto the next one!". So far we have this:
Code:
<HTML>
<title>Intrduction To Javascript</title>
<head><marquee>Wee, I am learning Javascipt</marquee></head>
<script language="Javascript">
alert("ChaosDealer73 says: HI!");
Side Note: You can add an infinate amount of alerts in there, just add another alert line, with different text in the quotations.
This is about going to wrap it up for the introduction, except, we need to end our script! This goes back to the start of this tutorial, end the script with this:
Now we have to save it, but it has to be saved as an HTML, so save it as: Intro To Javascript.html, and you will have a document, just double click that, and you will see what you have created.
This is what I had at the end, I added a few more alerts in there just for fun.
Code:
<HTML>
<title>Intrduction To Javascript</title>
<head><marquee>Wee, I am learning Javascipt</marquee></head>
<script language="Javascript">
alert("ChaosDealer73 says: HI!");
alert("Did you learn any?");
alert("I hope you did!");
alert("We will contine this lesson with part 2!");
</script>
-
heh good tut for REALLY beginners, or total noobz :lol:
-
good tutorial. Although everyone should be advised that javascript should be used sparringly. Some browsers don't support it at all, and alot of people have it turned off (most without realizing it).
Resident father figure.
-
Yeh. Javascript is cool, but what 43 says is true. Nice job though. Nice for a lot of people.
If you want help...
Screw you
If you make sigs...
Screw you
-
The title can be in the <head> tag...
-
nice tut but no special property at all
Similar Threads
-
By Vladman1327 in forum Support
Replies: 9
Last Post: 10-20-2005, 04:06 PM
-
By Tenken in forum Other Tutorials
Replies: 14
Last Post: 07-29-2005, 09:43 PM
-
By MinorThreat in forum The Void
Replies: 6
Last Post: 06-09-2005, 09:17 PM
-
By rchocobo in forum Support
Replies: 0
Last Post: 06-06-2005, 12:35 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|