
Example #1:
document.mypic.src
= "pic1.gif"
"Window" is not needed at the very beginning. It is assumed that all this is inside of the window.
This references an image named "mypic", changing its contents to "pic1.gif."
Document is the page the item is on, mypic is the item's name, and SRC is the item's source.
Example #2:
document.write(location.href)
write() is a method of the document object. Location.href displays the full URL of the window.
Notice that Location and Document are at the same level (both are in green). That means that you
get the location of that same-level document.