I”m trying to learn JavaScript, and I’m Stuck right out of the gate. In tutorial number 3 here:
[url]http://www.htmlgoodies.com/primers/jsp/hgjsp_3.html
my problem is with this section here:
[QUOTE]
It would appear from the script that again “getSomething()” is a method of “document”. Not so. The method of “document” is “write”. “getMonth()” is actually a method of the object Date. Again, look up at the script. “Date” is set aside in the command:
RightNow = new Date();
Here I am setting aside an object for the method getMonth() to work on. The format is the same each time you use dates and times. You must create an object. My object is titled RightNow.
if RightNow is an object created by the writer of the script, what is Date()?
and further this section says:
[QUOTE]
The problem is that these items are only methods. They need an object to act on and the document object won’t do it…
but the fifth line of the script contains “document.write” anyway, so what does he mean?
If their are any good beginner books out there, i’m all ears.
thanks!