Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Document properties
Property
Description
alinkcolor
Anchors
applets
bgColor
fgColor
Cookie
domain
Forms
Images
lastModif
ed
linkColor
Document properties
Propert
y
Description
title
URL
Anchors Property
This property is an array containing
references to all the named Anchor
objects in the
current document.
Syntax:
Document.anchor
Forms Property
This property is an array containing
references to all the Form objects in
the current document
Syntax:
document.forms[formID]
Links Property
This property is an array containing
references to all the Area and Link
objects in the current
document.
Syntax: document.links[linkID]
Cookie Property
This property is a string that returns
a report detailing all visible and unexpired cookies
that are associated with the specified
document.
Syntax:
Document.cookie
Domain Property
This property sets or returns the
domain name of the server from
which the document
originated.
Syntax: document.domain =
domaininfo
Title Property
This property returns the documents
name as defined between the
<TITLE></TITLE> tags.
Syntax: document.title
URL Property
This property is used to retrieve the
documents full URL.
Syntax: document.URL
bgColor Property
This property defines a documents background
color. The colorinfo argument is a string
that can contain either the hexadecimal
definition of the color or its literal description.
Syntax: document.bgColor = colorinfo
fgColor Property
This property defines a documents foreground
(text) color. The colorinfo argument is a
string that can contain either the hexadecimal
definition of the color or its literal description.
Syntax: document.fgColor = colorinfo
alinkColor Property
This property defines the color of an active link.
The colorinfo argument is a string that
can contain either the hexadecimal definition of
the colour or its literal description.
Syntax: document.alinkColor = colorinfo
vlinkColor Property
Document Methods
Method
Description
open()
close()
write()
writeln()
getElementByID()
getElementsByName
Accesses all elements with a specified name
()
getElementsByTagNa
Accesses all elements with a specified tagname
me()
Open method
The open() method opens a stream to collect the
output from any document.write or
document.writeln methods.
NOTE: If a document already exists in the target,
it will be cleared. If this method has no
arguments, a new window with about:blank is
displayed.
Syntax:
document.open(mimetype,replace)
Write method
The write() method writes HTML
expressions or JavaScript code to a
document.
Note: Multiple arguments
(exp1,exp2,exp3,...) can be listed and
they will be appended to the
document in order of occurrence.
Syntax:
document.write(exp1,exp2,exp3,
....)
Writeln methods
The writeln() method is identical to
the write() method, with the addition
of writing a new line character after
each expression.
Syntax:
document.writeln(exp1,exp2,exp3,....
)
Close methods
The close() method closes an output
stream opened with the
document.open method, and
displays the collected data.
Syntax:
Document.close()
Window object
length
location
name
navigator
opener
outerHeight
outerWidth
pageXOffset
pageYOffset
parent
screen
to the
to the
to the
to the
blur()
Description
Displays an alert box with a message and an OK
button
Removes focus from the current window
clearInterval()
clearTimeout()
close()
createPopup()
focus()
moveBy()
moveTo()
open()
print()
prompt()
alert()
confirm()
resizeBy()
resizeTo()
scroll()
scrollBy()
scrollTo()
Window.location
window.location.href returns the href (URL)
of the current page
window.location.hostname returns the
domain name of the web host
window.location.pathname returns the path
and filename of the current page
window.location.protocol returns the web
protocol used (http:// or https://)
window.location.assign loads a new
document