Dhtml

JavaScript
Alphabetical Reference

Dynamic HTML

Shortcuts

Overview
A
abs()
acos()
action
alert()
alinkColor
anchor()
anchors
appCodeName
applet
applets
appName
appVersion
area
areas
arguments
Array
asin()
atan()
atan2()
B
back()
bgColor
big()
blink()
blur()
bold()
Boolean
border
break
button
C
caller
ceil()
charAt()
charCodeAt()
checkbox
checked
clearTimeout()
click
close
closed
complete
concat() (Array)
concat() (String)
confirm()
constructor
continue
cookie
cos()
D
Date
defaultChecked
defaultSelected
defaultStatus
delete
do...while
document
domain
E
E
elements
embeds
escape()
eval()
event
exp()
F
fgColor
fixed()
floor()
focus()
fontColor()
fontSize()
for () {...}
for (var v in o) {...}
form
forms
forward
frame
fromCharCode()
Function
function
G
getDate()
getDay()
getHours()
getMinutes()
getMonth()
getSeconds()
getTime()
getTimezoneOffset()
getYear()
go()
H
hash
height
hidden
history
host
hostname
href
hspace
I
if () {...} else {...}
image
images
IMG
indexOf()
isNaN()
italics()
J
javaEnabled
join()
K
L
labeled
language
lastIndexOf()
lastModified
length (Array)
length (String)
link
link()
linkColor
links
LN10
LN2
location
location
log
LOG10E
LOG2E
lowsrc
M
match
Math
max()
MAX_VALUE
method
min()
MIN_VALUE
N
name
NaN
navigator
NEGATIVE_INFINITY
new
Number
O
Object
onAbort
onBlur
onChange
onClick
onDblClick
onError
onFocus
onKeyDown
onKeyPress
onKeyUp
onLoad
onMouseDown
onMouseMove
onMouseOut
onMouseOver
onMouseUp
onSelect
onSubmit
onUnload
open()
opener
options
P
parent
parse()
parseFloat()
parseInt()
password
pathname
PI
plugins
port
POSITIVE_INFINITY
pow()
prompt()
protocol
prototype
Q
R
radio
random
referrer
RegExp
reload()
replace()
replace()
reset
reset()
return
returnValue
reverse()
round()
S
screen
scroll()
search
search()
select
selectedIndex
self
setDate()
setHours()
setMinutes()
setMonth()
setSeconds()
setTime()
setTimeout()
setYear()
sin()
slice() (Array)
slice() (String)
small()
sort()
split()
sqrt()
SQRT1_2
SQRT2
src
status
strike()
String
sub()
submit
submit()
substr()
substring()
sup()
switch () {...}
T
tan()
target
text
text
textarea
this
toGMTString()
toLocaleString()
toLowerCase()
top
toString()
toUpperCase()
typeof
U
unescape()
url
userAgent
V
value
valueOf()
var
vLinkColor
void
vspace
W
while () {...}
width
window
with () {...}
write()
writeln()
X
Y
Z

Overview

This is an alphabetical reference of JavaScript methods and properties that are common to both Internet Explorer 4.0 and Netscape Navigator 4.0. However, their uses and/or implementations may differ. For details, consult the relevant documentation at the Microsoft or the Netscape site. For another, regularly updated reference, visit Coolnerds Mega Xrefs (this reference is based on the JavaScript Object Model Xref from the Coolnerds site).


A

abs()

JavaScript Method

Absolute value of a number.


acos()

JavaScript Method

Arc-cosine of a number.


action

DOM Property

Action attribute of a form.


alert(message)

DOM Method

Display an alert message box with the string message.


alinkColor

DOM Property

Active hyperlink color.


anchor()

JavaScript Method

Create an anchor. This is a named target in HTML, sort of like a bookmark into a page.


anchors

DOM Collection

Array of all anchors in the document.


appCodeName

DOM Property

The browser's code name.


applet

DHTML Object

Java applet object.


applets

DOM Collection

Array of all applets in the document.


appName

DOM Property

The browser's name (internal name of the browser application).


appVersion

DOM Property

The browser's version.


area

DHTML Object

Object for the AREA (hotspot) tag of an image map.


areas

DOM Collection

Array of areas in an image map.


arguments

JavaScript Property

Array of the arguments passed to the parent object.


Array

JavaScript Object

Array class, for collections of objects or variables of the same class or type.


asin()

JavaScript Method

Arc-sine of a number.


atan()

JavaScript Method

Arc-tangent of a number in degrees.


atan2()

JavaScript Method

Arc-tangent of a number in radians.


B

back()

DOM Method

Go one page back in the browser's history list.


bgColor

DOM Property

Background colour.


big()

JavaScript Method

Inserts <BIG> tags.


blink()

JavaScript Method

Inserts <BLINK> tags.


blur()

DOM Method

Deselects the current object (usually a form control).


bold()

JavaScript Method

Inserts <B> tags.


Boolean

JavaScript Object

Boolean class. Objects of this class may be either True or False.


border

DOM Property

Border thickness.


break

JavaScript Statement

Moves program control to the next executable point after the end of the current block -- ie. terminates a loop or leaves an if statement, etc.


button

DHTML Object

Form button object.


C

caller

JavaScript Property

Name of the calling function.


ceil(n)

JavaScript Method

Ceiling of n. This is the next integer greater than or equal to the number.


charAt(pos)

JavaScript Method

The character at position pos in a String.


charCodeAt(pos)

JavaScript Method

The unicode encoding of the character at position pos in a String. Unicode is a String representation code that replaces non-ASCII characters with hexadecimal codes.


checkbox

DHTML Object

Form checkbox object.


checked

DOM Property

True if the checkbox or radio button object is checked.


clearTimeout(timer)

DOM Method

Clears a timer created by setTimeout().


click

DOM Method

Simulates a mouse click.


close

DOM Method

Closes the document output stream.


closed

DOM Property

True if a window is closed.


complete

DOM Property

True after the object has loaded.


concat() (Array)

JavaScript Method

Concatenates (joins) two arrays.


concat() (String)

JavaScript Method

Concatenates (joins) two strings.


confirm(message)

DOM Method

Displays a confirmation dialog box with message.


constructor

JavaScript Property

Reference to the function that creates an object of the same class.


continue

JavaScript Statement

Returns program control to the beginning of a loop.


cookie

DOM Property

Used to access a cookie. A cookie is a small amount of information stored on your computer that is used by a web page to determine its content.


cos()

JavaScript Method

Cosine of an angle.


D

Date

JavaScript Object

Date class. Objects of this class hold information about a date.


defaultChecked

DOM Property

True if a check box is checked by default.


defaultSelected

DOM Property

Index of the default selected option in a form select control.


defaultStatus

DOM Property

Default status bar message.


delete

JavaScript Operator

Remove an element from an array or a property from an object.


do {...} while (condition)

JavaScript Statement

Repeatedly executes the statements inside {...} for as long as condition is True.


document

DHTML Object

Object representing the entire HTML document.


domain

DOM Property

Security domain of the document.


E

E

JavaScript Constant

Base of natural logarithms.


elements

DOM Collection

Array of all the elements (controls) in a form.


embeds

DOM Collection

Array of all embedded elements.


escape(string)

JavaScript Method

Returns the unicode representation of string. Unicode is a String representation code that replaces non-ASCII characters with hexadecimal codes.


eval(string)

JavaScript Method

Evaluates and executes string.


event

DHTML Object

Event object.


exp(n)

JavaScript Method

Returns n to the power of E.


F

fgColor

DOM Property

Text colour.


fixed()

JavaScript Method

Makes text fixed-width -- ie. it places <TT> tags around the text.


floor(n)

JavaScript Method

Floor of n. This is the next integer less than or equal to the number.


focus()

DOM Method

Selects the current object (usually a form control). This usually means placing the cursor in the control if the control is of type text.


fontColor(color)

JavaScript Method

Inserts <FONT COLOR="color"> tags around text.


fontSize(size)

JavaScript Method

Inserts <FONT SIZE="size"> tags around text.


for (initialisation; condition; increment) {...}

JavaScript Statement

Executes initialisation, then repeatedly executes the statements in {...} then increment so long as condition is True.


for (var variable in object) {...}

JavaScript Statement

Repeatedly executes the statements in {...} for each property of object. During each iteration, variable holds the name of the property.


form

DOM Property

Name of the form that the form control is an element of.


form

DHTML Object

Form object.


forms

DOM Collection

Array of all forms in the document.


forward

DOM Method

Go one page forward in the browser's history list.


frame

DHTML Object

Frame object.


fromCharCode(string)

JavaScript Method

Returns the normal representation of the unicode string. Unicode is a String representation code that replaces non-ASCII characters with hexadecimal codes.


Function

JavaScript Object

Function class. Objects of this class are considered to be functions.


function

JavaScript Statement

Declares a user-defined function.


G

getDate()

JavaScript Method

Returns the day of the month of a Date object.


getDay()

JavaScript Method

Returns the day of the week of a Date object.


getHours()

JavaScript Method

Returns the hour of a Date object.


getMinutes()

JavaScript Method

Returns the minute of a Date object.


getMonth()

JavaScript Method

Returns the month of a Date object.


getSeconds()

JavaScript Method

Returns the second of a Date object.


getTime()

JavaScript Method

Converts a date object to a time in milliseconds.


getTimezoneOffset()

JavaScript Method

Returns the offset from UTC (Universal Coordinated Time) of a Date object.


getYear()

JavaScript Method

Returns the two-digit year of a Date object.


go()

DOM Method

Go to a particular item in the browser's history list.


H

hash

DOM Property

Hash portion of a URL.


height

DOM Property

Height of an element.


hidden

DHTML Object

Form hidden control object.


history

DHTML Object

History list object.


host

DOM Property

Host and port of a URL.


hostname

DOM Property

Hostname of a URL.


href

DOM Property

Document's URL.


hspace

DOM Property

Element's horizontal margin.


I

if (condition) {...} else {---}

JavaScript Statement

Executes the statements in {...} if condition is True, otherwise it executes the statements in {---}.


image

DHTML Object

Form image submit button control.


images

DOM Collection

Array of all images.


IMG

DHTML Object

Bitmap image object.


indexOf(substring)

JavaScript Method

Returns the position of substring in a String.


isNaN()

DHTML Object

Returns True if the element is Not a Number.


italics()

JavaScript Method

Inserts <I> tags around text.


J

javaEnabled

DOM Property

True if the browser is Java enabled.


join()

JavaScript Method

Converts all of the elements of an Array to one joined String.


K


L

labeled

JavaScript Statement

Statement identifier.


language

DOM Property

Script language of the currently executing script.


lastIndexOf(substring)

JavaScript Method

Returns the position of the last occurence of substring in a String.


lastModified

DOM Property

Date and time of last modification of the document.


length (Array)

JavaScript Property

Number of elements in an Array.


length (String)

JavaScript Property

Number of characters in a String.


link

DHTML Object

Link object.


link()

JavaScript Method

Insert <A HREF="URL"> tags around text.


linkColor

DOM Property

Unvisited hyperlink colour.


links

DOM Collection

Array of all links.


LN10

JavaScript Constant

Natual logarithm of 10.


LN2

JavaScript Constant

Natual logarithm of 2.


location

DHTML Object

Current URL object.


location

DOM Property

URL of the current page.


log()

JavaScript Method

Natural logarithm of a number.


LOG10E

JavaScript Constant

Base-10 logarithm of E.


LOG2E

JavaScript Constant

Base-2 logarithm of E.


lowsrc

DOM Property

Low-resolution rsource of an image.


M

match

JavaScript Method

Performs a search on a String.


Math

JavaScript Object

Object containing elements related to mathematical functionality.


max()

JavaScript Method

Returns the largest of two values.


MAX_VALUE

JavaScript Constant

Largest number acceptable in JavaScript.


method

DOM Property

Data transfer method of a form -- either "get" or "put".


min()

JavaScript Method

Returns the smallest of two values.


MIN_VALUE

JavaScript Constant

Smallest acceptable number in JavaScript. Approximately 2.22E-308.


N

name

DOM Property

Name of the element.


NaN

JavScript Property

True if element is Not a Number.


navigator

DHTML Object

Object representing the browser.


NEGATIVE_INFINITY

JavaScript Constant

Value smaller than MIN_VALUE.


new

JavaScript Operator

Creates a new object.


Number

JavaScript Object

Number class. Objects of this class are numbers.


O

Object

JavaScript Object

Object class. All objects inherit from this class. It can also be used to convert a fundamental type to an object.


onAbort

DOM Event

Triggered when an image download aborts.


onBlur

DOM Event

Triggered when a form control loses focus (is deselected).


onChange

DOM Event

Triggered when a form control is changed and deselected.


onClick

DOM Event

Triggered when an element is clicked with the mouse.


onDblClick

DOM Event

Triggered when an element is double-clicked with the mouse.


onError

DOM Event

Triggered when an error occurs.


onFocus

DOM Event

Triggered when a form control gets focus (is selected).


onKeyDown

DOM Event

Triggered when the user depresses a key.


onKeyPress

DOM Event

Triggered when the user depresses and releases a key.


onKeyUp

DOM Event

Triggered when the user releases a key.


onLoad

DOM Event

Triggered when the page has finished loading all elements.


onMouseDown

DOM Event

Triggered when the user presses the mouse button.


onMouseMove

DOM Event

Triggered when the user moves the mouse cursor within the element.


onMouseOut

DOM Event

Triggered when the user moves the mouse cursor out of the element.


onMouseOver

DOM Event

Triggered when the user moves the mouse cursor in to the element.


onMouseUp

DOM Event

Triggered when the user releases the mouse button.


onSelect

DOM Event

Triggered when an element is selected.


onSubmit

DOM Event

Triggered when a form submit button is clicked.


onUnload

DOM Event

Triggered when the user leaves the current page.


open()

DOM Method

Opens a new browser window or a text stream.


opener

DOM Property

Name of the calling browser window.


options

DOM Collection

Array of options in a form select control.


P

parent

DOM Property

Parent of an object. This is the object one level up in the object hierarchy.


parse()

JavaScript Method

Number of milliseconds since the date 01-Jan-70.


parseFloat()

JavaScript Method

Converts a String representation of a floating-point number to its floating-point value.


parseInt()

JavaScript Method

Converts a String representation of an integer to its integer value.


password

DHTML Object

Form password control object.


pathname

DOM Property

Pathname portion of the document's URL.


PI

JavaScript Constant

PI -- approximately 3.14159.


plugins

DOM Collection

Array of all embedded plug-ins.


port

DHTML Object

Port portion of the document's URL.


POSITIVE_INFINITY

JavaScript Constant

Number larger than the largest number in JavaScript.


pow(n)

JavaScript Method

Returns a number to the power of n.


prompt(message)

DOM Method

Displays a prompt dialog box with message.


protocol

DOM Property

Protocol portion of the document's URL.


prototype

JavaScript Property

Prototype of a class of objects.


Q


R

radio

DHTML Object

Form radio button control object.


random

JavaScript Method

Returns a random floating-point number between 0 and 1.


referrer

DOM Property

URL of the previous location in the browsers history list.


RegExp

JavaScript Object

Object used to store information on pattern searches.


reload()

DOM Method

Reloads the current page.


replace()

JavaScript Method

Replaces text within a string.


replace()

DOM Method

Replaces the document and history session.


reset

DHTML Object

Form reset button object.


reset()

DOM Method

Resets all controls on a form to their initial (default) values.


return

JavaScript Statement

Returns (outputs) a value from a function.


returnValue

DOM Property

Return valie for an event or a dialog box.


reverse()

JavaScript Method

Reverses the order of elements in an Array.


round()

JavaScript Method

Rounds a number off to the nearest integer.


S

screen

DHTML Object

Screen object.


scroll(x, y)

DOM Method

Scrolls the window to position (x, y).


search

DOM Property

Search portion of the document's URL.


search()

JavaScript Method

Searches through a String.


select

DHTML Object

Form select box object.


selectedIndex

DOM Property

Index of the currently selected value in a form select box.


self

DOM Property

Current window object.


setDate(newDate)

JavaScript Method

Sets a Date object to newDate.


setHours()

JavaScript Method

Sets the hours of a Date object.


setMinutes()

JavaScript Method

Sets the minutes of a Date object.


setMonth()

JavaScript Method

Sets the month of a Date object.


setSeconds()

JavaScript Method

Sets the seconds of a Date object.


setTime()

JavaScript Method

Converts a Date object to a time in milliseconds.


setTimeout(statement, time)

DOM Method

Waits for time milliseconds, then executes statement and returns a timer.


setYear()

JavaScript Method

Sets the two-digit year of a Date object.


sin()

JavaScript Method

Sine of an angle.


slice() (Array)

JavaScript Method

Returns a subsection of an Array.


slice() (String)

JavaScript Method

Returns a subsection of a String.


small()

JavaScript Method

Inserts <SMALL> tags around text.


sort()

JavaScript Method

Sorts the elements of an Array into order.


split()

JavaScript Method

Converts a String to an Array of characters.


sqrt()

JavaScript Method

Square root of a number.


SQRT1_2

JavaScript Constant

Square root of 1/2 (one half).


SQRT2

JavaScript Constant

Square root of 2.


src

DOM Property

URL of the source of an image or multimedia element.


status

DOM Property

Status bar message.


strike()

JavaScript Method

Inserts <STRIKE> tags around text.


String

JavaScript Object

String class. Objects of this class are Strings.


sub()

JavaScript Method

Inserts <SUB> (sub-script) tags around text.


submit

DHTML Object

Form submit button object.


submit()

DOM Method

Submits a form.


substr()

JavaScript Method

Returns a sub-string of a String.


substring()

JavaScript Method

Returns a sub-string of a String.


sup()

JavaScript Method

Inserts <SUP> (super-script) tags around text.


switch (value) { case a: {...} case b: {...} }

JavaScript Statement

If value is equal to a, or b (etc), the statements for that case {...} are executed.


T

tan()

JavaScript Method

Tangent of an angle.


target

DOM Property

Target of a document or frame.


text

DHTML Object

Form text input object.


text

DOM Property

Displayed text in an option of a form select box, or the text colour.


textarea

DHTML Object

Form multi-line text input object.


this

JavaScript Statement

Reference to the current object.


toGMTString()

JavaScript Method

Converts a Date object to Greenwich Meridian Time.


toLocaleString()

JavaScript Method

Converts a Date object to the local time format.


toLowerCase()

JavaScript Method

Converts a String to lowercase.


top

DOM Property

Target for the top of a window.


toString()

JavaScript Method

Converts an object to a String.


toUpperCase()

JavaScript Method

Converts a String to uppercase.


typeof

JavaScript Operator

Data type of an expression.


U

unescape(string)

JavaScript Method

Returns the normal representation of the unicode string. Unicode is a String representation code that replaces non-ASCII characters with hexadecimal codes.


url

DOM Property

URL of the document.


userAgent

DOM Property

Client browser.


V

value

DOM Property

Contents of a form control.


valueOf()

JavaScript Method

Primitive value of an object.


var

JavaScript Statement

Declares a new variable.


vLinkColor

DOM Property

Colour of visited links.


void

JavaScript Operator

An undefined type.


vspace

DOM Property

Size of vertical margins.


W

while (condition) {...}

JavaScript Statement

Repeatedly executes {...} so long as condition is True.


width

DOM Property

Width of an element.


window

DHTML Object

Browser window object.


with (object) {...}

JavaScript Statement

Executes {...} for object. This means you don't have to fully reference the object for every property or method of that object.


write(text)

DOM Method

Inserts text into the document.


writeln(text)

DOM Method

Inserts text into the document, followed by a newline character.


X


Y


Z


Go back


Author: Scott Brady
Date Created: 4 May 99
Last Updated: