You probably feel a little cheated. You've already created a web page using html before this class and don't feel like it's really writing a computer program. Fair enough. Let's go ahead and write another program. Again this will be very simple.
We could write the program using notepad and have the browser interpret the instructions just like with html but there's a problem with that. Your browser, Internet Explorer is set to know show you any errors in the code it interprets. It's this way because if they had error messages turned on, whenever you went to a website you would get error messages (people writing code for web pages tend to be sloppy and write buggy code).
In this class we will HTML Kit write our code. You will need to download it using these instructions: Where to code. If you have problems getting the software then you can use the following website to try out this code: w3schools.com vbscript editor
You need to type:
<SCRIPT LANGUAGE="VBScript">
Document.Write "Hello World"
</SCRIPT>
So, what happened here:
<SCRIPT LANGUAGE="VBScript"> <-- This tells the
browser to use the Visual Basic Interpreter
Document.Write "Hello World"
<-- A little Object Oriented code here. The interpreter is told: Using the Document
object, use the "Write" Method to display "Hello World!"
</SCRIPT>
<-- Stop using the Visual Basic Interpreter and go back to html
In programming we define things in a specific organized way. Here are two important definitions:
1. Objects: Any thing that can be manipulated by a computer program. Examples: a window, a document (web pages), a textboxe, a picture, a button, etc.
2. Methods: The way we can manipulate an Object. Example: In the above code the document object has a method called Write. That method places text on that object.
3. Properties: All Objects have properties that we can change. If we wanted to change the background color property of the document (web page) we would simply change that property with code (document.bgcolor = "aqua").