Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

How to write a javascript program

  • Please log in to reply



    New Member

  • Member
  • Pip
  • 6 posts
Hi, I'm in a computer literacy class and um, I don't know much about javascript. It's confusing to me and my TA was not very helpful. I'm a beginner when it comes to computers.

Anyway, so we had an assignment where we had to make our own web page. Now the next assignment is to write a javascript program of my choice and add it to the web page. Can someone pleaaase write one for me? I guess it can just say "Welcome to my page. Hope you enjoy it"
  • 0




    Retired Staff

  • Retired Staff
  • 1,869 posts
Well Google turns up a lot if you care to look.

http://www.javascrip...rn/contents.htm Tutorial
http://homepage.ntlw...irstscript.html A very simple script.
http://www.codeproje.../jsbeginner.asp another Tutorial

And the list goes on...

A very simple script broken down.

document.write("Hello World");

document is an object. Anything you see on the page can be accessed as an object some how.

write() is a function, it does some action. In this case write something to a page.

"Hello World" is a string argument. It tells the function want to do, in the case write hello world. This can be a number, string or true or false or a variable.

An example of using a variable would be

var string = "Hello World";

Edited by Michael, 05 March 2007 - 11:01 PM.

  • 0

Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP