JavaScript 1.3 Functions and Objects

predefined functions
escape
eval
isFinite
isNaN
Number
parseFloat
parseInt
String
unescape

Object

predefined objects
Array
Boolean
Date
Function
Math
Number
RegExp
String

     navigator objects
Anchor
Applet
Area
Button
Checkbox
document
FileUpload
Form
Frame
Hidden
History
Image
Layer
Link
Location
MimeType
navigator
Option
Password
Plugin
Radio
Reset
Select
Submit
Text
Textarea
window
     other objects
event
screen
style


predefined functions

escape(string)
Encodes special characters in the specified string and returns the new string. It encodes any character that is not an ASCII alphanumeric character, with the exception of these characters:
* @ - _ + . />

eval(string)
Evaluates a string representing a JavaScript expression, statement, or sequence of statements.

isFinite(number)
If the argument is NaN, positive infinity or negative infinity, this method returns false, otherwise it returns true.

isNaN(testValue)
Evaluates an argument to determine if it is not a number.

Number(obj)
When the object is a Date object, Number returns a value in milliseconds measured from 01 January, 1970 UTC (GMT), positive after this date, negative before. If obj is a string that does not contain a well-formed numeric literal, Number returns NaN.

parseFloat(string)
Parses a string argument and returns a floating point number.

parseInt(string[, radix])
Parses a string argument and returns an integer of the specified radix or base.

String(obj)
Converts the specified object to a string. When the object is a Date object, String returns a more readable string representation of the date. Its format is: Thu Aug 18 04:37:43 Pacific Daylight Time 1983.

unescape(string)
Returns a series of characters in the ISO-Latin-1 character set for the specified hexadecimal encoding value.


Object

new Object()

constructor   Specifies the function that creates an object's prototype.
prototype   Allows the addition of properties to all objects.

eval(string)   Deprecated. Evaluates a string of JavaScript code in the context of the specified object.
toSource()   Returns an object literal representing the specified object; you can use this value to create a new object.
toString()   Returns a string representing the specified object.
unwatch(prop)   Removes a watchpoint from a property of the object.
valueOf()   Returns the primitive value of the specified object.
watch(prop, handler)   Adds a watchpoint to a property of the object.


predefined objects

Array

new Array(arrayLength)
new Array(element0, element1, ..., elementN)
[element0, element1, ..., elementN]

constructor   Specifies the function that creates an object's prototype.
index   For an array created by a regular expression match, the zero-based index of the match in the string.
input   For an array created by a regular expression match, reflects the original string against which the regular expression was matched.
length   Reflects the number of elements in an array
prototype   Allows the addition of properties to all objects.

concat(arrayName2, arrayName3, ..., arrayNameN)   Joins two or more arrays and returns a new array.
join(separator)   Joins all elements of an array into a string.
pop()   Removes the last element from an array and returns that element.
push(element1, ..., elementN)   Adds one or more elements to the end of an array and returns the new length of the array.
reverse()   Transposes the elements of an array: the first array element becomes the last and the last becomes the first.
shift()   Removes the first element from an array and returns that element
slice(begin[,end])   Extracts a section of an array and returns a new array.
splice(index, howMany, [element1][, ..., elementN])   Adds and/or removes elements from an array.
sort(compareFunction)   Sorts the elements of an array.
toSource()   Returns an array literal representing the specified array; you can use this value to create a new array. Overrides the Object.toSource method.
toString()   Returns a string representing the array and its elements. Overrides the Object.toString method.
arrayName.unshift(element1,..., elementN)   Adds one or more elements to the front of an array and returns the new length of the array.
valueOf()   Returns the primitive value of the array. Overrides the Object.valueOf method.

Boolean

new Boolean(value)

constructor   Specifies the function that creates an object's prototype.
prototype   Defines a property that is shared by all Boolean objects.

toSource()   Returns an object literal representing the specified Boolean object; you can use this value to create a new object. Overrides the Object.toSource method.
toString()   Returns a string representing the specified object. Overrides the Object.toString method.
valueOf()   Returns the primitive value of a Boolean object. Overrides the Object.valueOf method.

Date

new Date()
new Date(milliseconds)
new Date(dateString)
new Date(yr_num, mo_num, day_num[, hr_num, min_num, sec_num, ms_num])

constructor   Specifies the function that creates an object's prototype.
prototype   Allows the addition of properties to a Date object.

getDate()   Returns the day of the month for the specified date according to local time.
getDay()   Returns the day of the week for the specified date according to local time.
getFullYear()   Returns the year of the specified date according to local time.
getHours()   Returns the hour in the specified date according to local time.
getMilliseconds()   Returns the milliseconds in the specified date according to local time.
getMinutes()   Returns the minutes in the specified date according to local time.
getMonth()   Returns the month in the specified date according to local time.
getSeconds()   Returns the seconds in the specified date according to local time.
getTime()   Returns the numeric value corresponding to the time for the specified date according to local time.
getTimezoneOffset()   Returns the time-zone offset in minutes for the current locale.
getUTCDate()   Returns the day (date) of the month in the specified date according to universal time.
getUTCDay()   Returns the day of the week in the specified date according to universal time.
getUTCFullYear()   Returns the year in the specified date according to universal time.
getUTCHours()   Returns the hours in the specified date according to universal time.
getUTCMilliseconds()   Returns the milliseconds in the specified date according to universal time.
getUTCMinutes()   Returns the minutes in the specified date according to universal time.
getUTCMonth()   Returns the month according in the specified date according to universal time.
getUTCSeconds()   Returns the seconds in the specified date according to universal time.
getYear()   Returns the year in the specified date according to local time.
Date.parse(dateString)   Returns the number of milliseconds in a date string since January 1, 1970, 00:00:00, local time.
setDate(dayValue)   Sets the day of the month for a specified date according to local time.
setFullYear(yearValue[, monthValue, dayValue])   Sets the full year for a specified date according to local time.
setHours(hoursValue[, minutesValue, secondsValue, msValue])   Sets the hours for a specified date according to local time.
setMilliseconds(millisecondsValue)   Sets the milliseconds for a specified date according to local time.
setMinutes(minutesValue[, secondsValue, msValue])   Sets the minutes for a specified date according to local time.
setMonth(monthValue[, dayValue])   Sets the month for a specified date according to local time.
setSeconds(secondsValue[, msValue])   Sets the seconds for a specified date according to local time.
setTime(timevalue)   Sets the value of a Date object according to local time.
setUTCDate(dayValue)   Sets the day of the month for a specified date according to universal time.
setUTCFullYear(yearValue[, monthValue, dayValue])   Sets the full year for a specified date according to universal time.
setUTCHour(hoursValue[, minutesValue, secondsValue, msValue])   Sets the hour for a specified date according to universal time.
setUTCMilliseconds(millisecondsValue)   Sets the milliseconds for a specified date according to universal time.
setUTCMinutes(minutesValue[, secondsValue, msValue])   Sets the minutes for a specified date according to universal time.
setUTCMonth(monthValue[, dayValue])   Sets the month for a specified date according to universal time.
setUTCSeconds(secondsValue[, msValue])   Sets the seconds for a specified date according to universal time.
setYear(yearValue)   Sets the year for a specified date according to local time.
toGMTString()   Converts a date to a string, using the Internet GMT conventions.
toLocaleString()   Converts a date to a string, using the current locale's conventions.
toSource()   Returns an object literal representing the specified Date object; you can use this value to create a new object. Overrides the Object.toSource method.
toString()   Returns a string representing the specified Date object. Overrides the Object.toString method.
toUTCString()   Converts a date to a string, using the universal time convention.
Date.UTC(year, month, day[, hrs, min, sec, ms])   Returns the number of milliseconds in a Date object since January 1, 1970, 00:00:00, universal time.
valueOf()   Returns the primitive value of a Date object. Overrides the Object.valueOf

Function

new Function ([arg1[, arg2[, ... argN]],] functionBody)
function name([param[, param[, ... param]]]) {statements}

arguments   An array corresponding to the arguments passed to a function.
arguments.callee   Specifies the function body of the currently executing function.
arguments.caller   Specifies the name of the function that invoked the currently executing function.
arguments.length   Specifies the number of arguments passed to the function.
arity   Specifies the number of arguments expected by the function.
constructor   Specifies the function that creates an object's prototype.
length   Specifies the number of arguments expected by the function.
prototype   Allows the addition of properties to a Function object.

apply(thisArg[, argArray])   Allows you to apply a method of another object in the context of a different object (the calling object).
call(thisArg[, arg1[, arg2[, ...]]])   Allows you to call (execute) a method of another object in the context of a different object (the calling object).
toSource()   Returns a string representing the source code of the function. Overrides the Object.toSource method.
toString()   Returns a string representing the source code of the function. Overrides the Object.toString method.
valueOf()   Returns a string representing the source code of the function. Overrides the Object.valueOf method.

Math

A top-level, predefined object which can be accessed without using a constructor or calling a method.

E   Euler's constant and the base of natural logarithms, approximately 2.718.
LN10   Natural logarithm of 10, approximately 2.302.
LN2   Natural logarithm of 2, approximately 0.693.
LOG10E   Base 10 logarithm of E (approximately 0.434).
LOG2E   Base 2 logarithm of E (approximately 1.442).
PI   Ratio of the circumference of a circle to its diameter, approximately 3.14159.
SQRT1_2   Square root of 1/2; equivalently, 1 over the square root of 2, approximately 0.707.
SQRT2   Square root of 2, approximately 1.414.

abs(x)   Returns the absolute value of a number.
acos(x)   Returns the arccosine (in radians) of a number.
asin(x)   Returns the arcsine (in radians) of a number.
atan(x)   Returns the arctangent (in radians) of a number.
atan2(y, x)   Returns the arctangent of the quotient of its arguments.
ceil(x)   Returns the smallest integer greater than or equal to a number.
cos(x)   Returns the cosine of a number.
exp(x)   Returns Enumber, where number is the argument, and E is Euler's constant, the base of the natural logarithms.
floor(x)   Returns the largest integer less than or equal to a number.
log(x)   Returns the natural logarithm (base E) of a number.
max(x,y)   Returns the greater of two numbers.
min(x,y)   Returns the lesser of two numbers.
pow(x,y)   Returns base to the exponent power, that is, baseexponent.
random()   Returns a pseudo-random number between 0 and 1.
round(x)   Returns the value of a number rounded to the nearest integer.
sin(x)   Returns the sine of a number.
sqrt(x)   Returns the square root of a number.
tan(x)   Returns the tangent of a number.

Number

new Number(value)

constructor   Specifies the function that creates an object's prototype.
MAX_VALUE   The largest representable number.
MIN_VALUE   The smallest representable number.
NaN   Special "not a number" value.
NEGATIVE_INFINITY   Special value representing negative infinity; returned on overflow.
POSITIVE_INFINITY   Special value representing infinity; returned on overflow.
prototype   Allows the addition of properties to a Number object.

toSource()   Returns an object literal representing the specified Number object; you can use this value to create a new object. Overrides the Object.toSource method.
toString()   Returns a string representing the specified object. Overrides the Object.toString method.
valueOf()   Returns the primitive value of the specified object. Overrides the Object.valueOf method.

RegExp

new RegExp("pattern"[, "flags"])
/pattern/flags

$1, ..., $9   Parenthesized substring matches, if any.
$_   See input.
$*   See multiline.
$&   See lastMatch.
$+   See lastParen.
$`   See leftContext.
$'   See rightContext.
constructor   Specifies the function that creates an object's prototype.
global   Whether or not to test the regular expression against all possible matches in a string, or only against the first.
ignoreCase   Whether or not to ignore case while attempting a match in a string.
input   The string against which a regular expression is matched.
lastIndex   The index at which to start the next match.
lastMatch   The last matched characters.
lastParen   The last parenthesized substring match, if any.
leftContext   The substring preceding the most recent match.
multiline   Whether or not to search in strings across multiple lines.
prototype   Allows the addition of properties to all objects.
rightContext   The substring following the most recent match.
source   The text of the pattern.

regex.compile(pattern[, flags])   Compiles a regular expression object.
regex.exec([str]) regex([str])   Executes a search for a match in its string parameter.
regex.test([str])   Tests for a match in its string parameter.
toSource()   Returns an object literal representing the specified object; you can use this value to create a new object. Overrides the Object.toSource method.
toString()   Returns a string representing the specified object. Overrides the Object.toString method.
valueOf()   Returns the primitive value of the specified object. Overrides the Object.valueOf method.

String

new String(string)

constructor   Specifies the function that creates an object's prototype.
length   Reflects the length of the string.
prototype   Allows the addition of properties to a String object.

anchor(nameAttribute)   Creates an HTML anchor that is used as a hypertext target.
big()   Causes a string to be displayed in a big font as if it were in a BIG tag.
blink()   Causes a string to blink as if it were in a BLINK tag.
bold()   Causes a string to be displayed as if it were in a B tag.
charAt(index)   Returns the character at the specified index.
charCodeAt([index])   Returns a number indicating the Unicode value of the character at the given index.
concat(string2, string3[, ..., stringN])   Combines the text of two or more strings and returns a new string.
fixed()   Causes a string to be displayed in fixed-pitch font as if it were in a TT tag.
fontcolor(color)   Causes a string to be displayed in the specified color as if it were in a <FONT COLOR=color> tag.
fontsize(size)   Causes a string to be displayed in the specified font size as if it were in a <FONT SIZE=size> tag.
fromCharCode(num1, ..., numN)   Returns a string created by using the specified sequence of Unicode values.
indexOf(searchValue[, fromIndex])   Returns the index within the calling String object of the first occurrence of the specified value, or -1 if not found.
italics()   Causes a string to be italic, as if it were in an I tag.
lastIndexOf(searchValue[, fromIndex])   Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found.
link(hrefAttribute)   Creates an HTML hypertext link that requests another URL.
match(regexp)   Used to match a regular expression against a string.
replace(regex, newSubStr) replace(regex, function)   Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring.
search(regexp)   Executes the search for a match between a regular expression and a specified string.
slice(beginslice[, endSlice])   Extracts a section of a string and returns a new string.
small()   Causes a string to be displayed in a small font, as if it were in a SMALL tag.
split([separator][, limit])   Splits a String object into an array of strings by separating the string into substrings.
strike()   Causes a string to be displayed as struck-out text, as if it were in a STRIKE tag.
sub()   Causes a string to be displayed as a subscript, as if it were in a SUB tag.
substr(start[, length])   Returns the characters in a string beginning at the specified location through the specified number of characters.
substring(indexA, indexB)   Returns the characters in a string between two indexes into the string.
sup()   Causes a string to be displayed as a superscript, as if it were in a SUP tag.
toLowerCase()   Returns the calling string value converted to lowercase.
toSource()   Returns an object literal representing the specified object; you can use this value to create a new object. Overrides the Object.toSource method.
toString()   Returns a string representing the specified object. Overrides the Object.toString method.
toUpperCase()   Returns the calling string value converted to uppercase.
valueOf()   Returns the primitive value of the specified object. Overrides the Object.valueOf method.


navigator objects




Anchor

Created by using the HTML A tag or calling the String.anchor method. The JavaScript runtime engine creates an Anchor object corresponding to each A tag in the document that supplies the NAME attribute. It puts these objects in an array in the document.anchors property.
theString.anchor(nameAttribute)

name   A string specifying the anchor's name.
text   A string specifying the text of an anchor.
x   The horizontal position of the anchor's left edge, in pixels, relative to the left edge of the document.
y   The vertical position of the anchor's top edge, in pixels, relative to the top edge of the document.


Applet

Created by the HTML APPLET tag. The JavaScript runtime engine creates an Applet object corresponding to each applet in the document. It puts these objects in an array in the document.applets property.

Area

Area objects are a type of Link object.

Button

Created by the HTML INPUT tag, with "button" as the value of the TYPE attribute. For a given form, the JavaScript runtime engine creates appropriate Button objects and puts these objects in the elements array of the corresponding Form object.

form   Specifies the form containing the Button object.
name   Reflects the NAME attribute.
type   Reflects the TYPE attribute.
value   Reflects the VALUE attribute.

blur()   Removes focus from the button.
click()   Simulates a mouse-click on the button.
focus()   Gives focus to the button.
handleEvent(event)   Invokes the handler for the specified event.

Checkbox

Created by the HTML INPUT tag, with "checkbox" as the value of the TYPE attribute. For a given form, the JavaScript runtime engine creates appropriate Checkbox objects and puts these objects in the elements array of the corresponding Form object.

checked   Boolean property that reflects the current state of the checkbox.
defaultChecked   Boolean property that reflects the CHECKED attribute.
form   Specifies the form containing the Checkbox object.
name   Reflects the NAME attribute.
type   Reflects the TYPE attribute.
value   Reflects the TYPE attribute.

blur()   Removes focus from the checkbox.
click()   Simulates a mouse-click on the checkbox.
focus()   Gives focus to the checkbox.
handleEvent(event)   Invokes the handler for the specified event.

document

The JavaScript runtime engine creates a document object for each HTML page.

alinkColor   A string that specifies the ALINK attribute.
anchors   An array containing an entry for each anchor in the document.
applets   An array containing an entry for each applet in the document.
bgColor   A string that specifies the BGCOLOR attribute.
classes   Creates a Style object that can specify the styles of HTML tags with a specific CLASS attribute.
cookie   Specifies a cookie.
domain   Specifies the domain name of the server that served a document.
embeds   An array containing an entry for each plug-in in the document.
fgColor   A string that specifies the TEXT attribute.
formName   A separate property for each named form in the document.
forms   An array a containing an entry for each form in the document.
height   The height of the document, in pixels.
ids   Creates a Style object that can specify the style of individual HTML tags.
images   An array containing an entry for each image in the document.
lastModified   A string that specifies the date the document was last modified.
layers   Array containing an entry for each layer within the document.
linkColor   A string that specifies the LINK attribute.
links   An array containing an entry for each link in the document.
plugins   An array containing an entry for each plug-in in the document.
referrer   A string that specifies the URL of the calling document.
tags   Creates a Style object that can specify the styles of HTML tags.
title   A string that specifies the contents of the TITLE tag.
URL   A string that specifies the complete URL of a document.
vlinkColor   A string that specifies the VLINK attribute.
width   The width of the document, in pixels.

captureEvents(eventType)   Sets the document to capture all events of the specified type.
close()   Closes an output stream and forces data to display.
contextual(context1, ...[contextN,] affectedStyle)   Uses contextual selection criteria to specify a Style object that can set the style of individual HTML tags.
getSelection()   Returns a string containing the text of the current selection.
handleEvent(event)   Invokes the handler for the specified event.
open([mimeType, [replace]])   Opens a stream to collect the output of write or writeln methods.
releaseEvents(eventType)   Sets the window or document to release captured events of the specified type, sending the event to objects further along the event hierarchy.
routeEvent(event)   Passes a captured event along the normal event hierarchy.
document.write(expr1[, ...,exprN])   Writes one or more HTML expressions to a document in the specified window.
writeln(expr1[, ... exprN])   Writes one or more HTML expressions to a document in the specified window and follows them with a newline character.

FileUpload

Created by the HTML INPUT tag, with "file" as the value of the TYPE attribute. For a given form, the JavaScript runtime engine creates appropriate FileUpload objects and puts these objects in the elements array of the corresponding Form object.

form   Specifies the form containing the FileUpload object.
name   Reflects the NAME attribute.
type   Reflects the TYPE attribute.
value   Reflects the current value of the file upload element's field; this corresponds to the name of the file to upload.

blur()   Removes focus from the object.
focus()   Gives focus to the object.
handleEvent(event)   Invokes the handler for the specified event.
select()   Selects the input area of the file upload field.

Form

Created by the HTML FORM tag. The JavaScript runtime engine creates a Form object for each FORM tag in the document. It can be accessed through the document.forms property and through named properties of that object.

action   Reflects the ACTION attribute.
elements   An array reflecting all the elements in a form.
encoding   Reflects the ENCTYPE attribute.
length   Reflects the number of elements on a form.
method   Reflects the METHOD attribute.
name   Reflects the NAME attribute.
target   Reflects the TARGET attribute.

handleEvent(event)   Invokes the handler for the specified event.
reset()   Simulates a mouse click on a reset button for the calling form.
submit()   Submits a form.

Frame

Every Frame object is a window object, and has all the methods and properties of a window object.

Hidden

Created by the HTML INPUT tag, with "hidden" as the value of the TYPE attribute. For a given form, the JavaScript runtime engine creates appropriate Hidden objects and puts these objects in the elements array of the corresponding Hidden object.

form   Specifies the form containing the Hidden object.
name   Reflects the NAME attribute.
type   Reflects the TYPE attribute.
value   Reflects the current value of the Hidden object.

History

History objects are predefined JavaScript objects that can be accessed through the history property of a window object.

current   Specifies the URL of the current history entry.
length   Reflects the number of entries in the history list.
next   Specifies the URL of the next history entry.
previous   Specifies the URL of the previous history entry.

back()   Loads the previous URL in the history list.
forward()   Loads the next URL in the history list.
go(delta) go(location)   Loads a URL from the history list.

Image

The JavaScript runtime engine creates an Image object corresponding to each IMG tag in your document. It puts these objects in an array in the document.images property.
new Image([width,] [height])

border   Reflects the BORDER attribute.
complete   Boolean value indicating whether the web browser has completed its attempt to load the image.
height   Reflects the HEIGHT attribute.
hspace   Reflects the HSPACE attribute.
lowsrc   Reflects the LOWSRC attribute.
name   Reflects the NAME attribute.
src   Reflects the SRC attribute.
vspace   Reflects the VSPACE attribute.
width   Reflects the WIDTH attribute.

handleEvent(event)   Invokes the handler for the specified event.

Layer

The HTML LAYER or ILAYER tag, or using cascading style sheet syntax. The JavaScript runtime engine creates a Layer object corresponding to each layer in the document. It puts these objects in an array in the document.layers property.

above   The layer object above this one in z-order, among all layers in the document or the enclosing window object if this layer is topmost.
background   The image to use as the background for the layer's canvas.
bgColor   The color to use as a solid background color for the layer's canvas.
below   The layer object below this one in z-order, among all layers in the document or null if this layer is at the bottom.
clip.bottom   The bottom edge of the clipping rectangle (the part of the layer that is visible.)
clip.height   The height of the clipping rectangle (the part of the layer that is visible.)
clip.left   The left edge of the clipping rectangle (the part of the layer that is visible.)
clip.right   The right edge of the clipping rectangle (the part of the layer that is visible.)
clip.top   The top edge of the clipping rectangle (the part of the layer that is visible.)
clip.width   The width of the clipping rectangle (the part of the layer that is visible.)
document   The layer's associated document.
left   The horizontal position of the layer's left edge, in pixels, relative to the origin of its parent layer.
name   A string specifying the name assigned to the layer through the ID attribute in the LAYER tag.
pageX   The horizontal position of the layer, in pixels, relative to the page.
pageY   The vertical position of the layer, in pixels, relative to the page.
parentLayer   The layer object that contains this layer, or the enclosing window object if this layer is not nested in another layer.
siblingAbove   The layer object above this one in z-order, among all layers that share the same parent layer, or null if the layer has no sibling above.
siblingBelow   The layer object below this one in z-order, among all layers that share the same parent layer, or null if layer is at the bottom.
src   A string specifying the URL of the layer's content.
top   The vertical position of the layer's top edge, in pixels, relative to the origin of its parent layer.
visibility   Whether or not the layer is visible.
window   The window or Frame object that contains the layer, regardless of whether the layer is nested within another layer.
x   A convenience synonym for Layer.left.
y   A convenience synonym for Layer.top.
zIndex   The relative z-order of this layer with respect to its siblings.

captureEvents(eventType)   Sets the window or document to capture all events of the specified type.
handleEvent(event)   Invokes the handler for the specified event.
load(sourcestring, width)   Changes the source of a layer to the contents of the specified file, and simultaneously changes the width at which the layer's HTML contents will be wrapped.
moveAbove(aLayer)   Stacks this layer above the layer specified in the argument, without changing either layer's horizontal or vertical position.
moveBelow(aLayer)   Stacks this layer below the specified layer, without changing either layer's horizontal or vertical position.
moveBy(horizontal, vertical)   Changes the layer position by applying the specified deltas, measured in pixels.
moveTo(x-coordinate, y-coordinate)   Moves the top-left corner of the window to the specified screen coordinates.
moveToAbsolute(x, y)   Changes the layer position to the specified pixel coordinates within the page (instead of the containing layer.)
releaseEvents(eventType)   Sets the layer to release captured events of the specified type, sending the event to objects further along the event hierarchy.
resizeBy(width, height)   Resizes the layer by the specified height and width values (in pixels).
resizeTo(width, height)   Resizes the layer to have the specified height and width values (in pixels).
routeEvent(event)   Passes a captured event along the normal event hierarchy.

Link

Created by by using the HTML A or AREA tag or by a call to the String.link method. The JavaScript runtime engine creates a Link object corresponding to each A and AREA tag in the document that supplies the HREF attribute. It puts these objects as an array in the document.links property.

hash   Specifies an anchor name in the URL.
host   Specifies the host and domain name, or IP address, of a network host.
hostname   Specifies the host:port portion of the URL.
href   Specifies the entire URL.
pathname   Specifies the URL-path portion of the URL.
port   Specifies the communications port that the server uses.
protocol   Specifies the beginning of the URL, including the colon.
search   Specifies a query string.
target   Reflects the TARGET attribute.
text   A string containing the content of the corresponding A tag.
x   The horizontal position of the link's left edge, in pixels, relative to the left edge of the document.
y   The vertical position of the link's top edge, in pixels, relative to the top edge of the document.

handleEvent(event)   Invokes the handler for the specified event.

Location

Location objects are predefined JavaScript objects that can be accessed through the location property of a window object.

hash   Specifies an anchor name in the URL.
host   Specifies the host and domain name, or IP address, of a network host.
hostname   Specifies the host:port portion of the URL.
href   Specifies the entire URL.
pathname   Specifies the URL-path portion of the URL.
port   Specifies the communications port that the server uses.
protocol   Specifies the beginning of the URL, including the colon.
search   Specifies a query.

reload([forceGet])   Forces a reload of the window's current document.
replace(URL)   Loads the specified URL over the current history entry.

MimeType

These objects are predefined JavaScript objects that can be accessed through the mimeTypes array of the navigator or Plugin object.
navigator.mimeTypes[index]

description   A description of the MIME type.
enabledPlugin   Reference to the Plugin object configured for the MIME type.
suffixes   A string listing possible filename extensions for the MIME type, for example "mpeg, mpg, mpe, mpv, vbs, mpegv".
type   The name of the MIME type, for example "video/mpeg" or "audio/x-wav".

navigator

The JavaScript runtime engine on the client automatically creates the navigator object.

appCodeName   Specifies the code name of the browser.
appName   Specifies the name of the browser.
appVersion   Specifies version information for the Navigator.
language   Indicates the translation of the Navigator being used.
mimeTypes   An array of all MIME types supported by the client.
platform   Indicates the machine type for which the Navigator was compiled.
plugins   An array of all plug-ins currently installed on the client.
userAgent   Specifies the user-agent header.

javaEnabled()   Tests whether Java is enabled.
plugins.refresh()   Makes newly installed plug-ins available and optionally reloads open documents that contain plug-ins.
preference(prefName[, setValue])   Allows a signed script to get and set certain Navigator preferences.
savePreferences()   Saves the Navigator preferences to the local file prefs.js.
navigator.taintEnabled()   Specifies whether data tainting is enabled.

Option

Created by the Option constructor or the HTML OPTION tag.
new Option([text[, value[, defaultSelected[, selected]]]])

defaultSelected   Specifies the initial selection state of the option
index   The zero-based index of an element in the Select.options array.
length   The number of elements in the Select.options array.
selected   Specifies the current selection state of the option
text   Specifies the text for the option
value   Specifies the value that is returned to the server when the option is selected and the form is submitted

Password

Created by the HTML INPUT tag, with "password" as the value of the TYPE attribute. For a given form, the JavaScript runtime engine creates appropriate Password objects and puts these objects in the elements array of the corresponding Form object.

defaultValue   Reflects the VALUE attribute.
form   Specifies the form containing the Password object.
name   Reflects the NAME attribute.
type   Reflects the TYPE attribute.
value   Reflects the current value of the Password object's field.

blur()   Removes focus from the object.
focus()   Gives focus to the object.
handleEvent(event)   Invokes the handler for the specified event.
select()   Selects the input area of the object.

Plugin

Plugin objects are predefined JavaScript objects that can be accessed through the navigator.plugins array.

description   A description of the plug-in.
filename   Name of the plug-in file on disk.
length   Number of elements in the plug-in's array of MimeType objects.
name   Name of the plug-in.

Radio

Created by the HTML INPUT tag, with "radio" as the value of the TYPE attribute.

checked   Lets you programmatically select a radio button (property of the individual button).
defaultChecked   Reflects the CHECKED attribute (property of the individual button).
form   Specifies the form containing the Radio object (property of the array of buttons).
name   Reflects the NAME attribute (property of the array of buttons).
type   Reflects the TYPE attribute (property of the array of buttons).
value   Reflects the VALUE attribute (property of the array of buttons).

blur()   Removes focus from the radio button.
click()   Simulates a mouse-click on the radio button.
focus()   Gives focus to the radio button.
handleEvent(event)   Invokes the handler for the specified event.

Reset

Created by the HTML INPUT tag, with "reset" as the value of the TYPE attribute. For a given form, the JavaScript runtime engine creates an appropriate Reset object and puts it in the elements array of the corresponding Form object.

form   Specifies the form containing the Reset object.
name   Reflects the NAME attribute.
type   Reflects the TYPE attribute.
value   Reflects the VALUE attribute.

blur()   Removes focus from the reset button.
click()   Simulates a mouse-click on the reset button.
focus()   Gives focus to the reset button.
handleEvent(event)   Invokes the handler for the specified event.

Select

Created by the HTML SELECT tag. For a given form, the JavaScript runtime engine creates appropriate Select objects for each selection list and puts these objects in the elements array of the corresponding Form object.

form   Specifies the form containing the selection list.
length   Reflects the number of options in the selection list.
name   Reflects the NAME attribute.
options   Reflects the OPTION tags.
selectedIndex   Reflects the index of the selected option (or the first selected option, if multiple options are selected).
type   Specifies that the object is represents a selection list and whether it can have one or more selected options.

blur()   Removes focus from the selection list.
focus()   Gives focus to the selection list.
handleEvent(event)   Invokes the handler for the specified event.

Submit

Created by the HTML INPUT tag, with "submit" as the value of the TYPE attribute. For a given form, the JavaScript runtime engine creates an appropriate Submit object and puts it in the elements array of the corresponding Form object.

form   Specifies the form containing the Submit object.
name   Reflects the NAME attribute.
type   Reflects the TYPE attribute.
value   Reflects the VALUE attribute.

lur()   Removes focus from the submit button.
click()   Simulates a mouse-click on the submit button.
focus()   Gives focus to the submit button.
handleEvent(event)   Invokes the handler for the specified event.

Text

Created by the HTML INPUT tag, with "text" as the value of the TYPE attribute. For a given form, the JavaScript runtime engine creates appropriate Text objects and puts these objects in the elements array of the corresponding Form object.

defaultValue   Reflects the VALUE attribute.
form   Specifies the form containing the Text object.
name   Reflects the NAME attribute.
type   Reflects the TYPE attribute.
value   Reflects the current value of the Text object's field.

blur()   Removes focus from the object.
focus()   Gives focus to the object.
handleEvent(event)   Invokes the handler for the specified event.
select()   Selects the input area of the object.

Textarea

Created by the HTML TEXTAREA tag. For a given form, the JavaScript runtime engine creates appropriate Textarea objects and puts these objects in the elements array of the corresponding Form object.

defaultValue   Reflects the VALUE attribute.
form   Specifies the form containing the Textarea object.
name   Reflects the NAME attribute.
type   Specifies that the object is a Textarea object.
value   Reflects the current value of the Textarea object.

blur()   Removes focus from the object.
focus()   Gives focus to the object.
handleEvent(event)   Invokes the handler for the specified event.
select()   Selects the input area of the object.

window

The JavaScript runtime engine creates a window object for each BODY or FRAMESET tag. It also creates a window object to represent each frame defined in a FRAME tag. In addition, you can create other windows by calling the window.open method.

closed   Specifies whether a window has been closed.
crypto   An object which allows access Navigator's encryption features.
defaultStatus   Reflects the default message displayed in the window's status bar.
document   Contains information on the current document, and provides methods for displaying HTML output to the user.
frames   An array reflecting all the frames in a window.
history   Contains information on the URLs that the client has visited within a window.
innerHeight   Specifies the vertical dimension, in pixels, of the window's content area.
innerWidth   Specifies the horizontal dimension, in pixels, of the window's content area.
length   The number of frames in the window.
location   Contains information on the current URL.
locationbar   Represents the browser window's location bar.
menubar   Represents the browser window's menu bar.
name   A unique name used to refer to this window.
offscreenBuffering   Specifies whether updates to a window are performed in an offscreen buffer.
opener   Specifies the window name of the calling document when a window is opened using the open method
outerHeight   Specifies the vertical dimension, in pixels, of the window's outside boundary.
outerWidth   Specifies the horizontal dimension, in pixels, of the window's outside boundary.
pageXOffset   Provides the current x-position, in pixels, of a window's viewed page.
pageYOffset   Provides the current y-position, in pixels, of a window's viewed page.
parent   A synonym for a window or frame whose frameset contains the current frame.
personalbar   Represents the browser window's personal bar (also called the directories bar).
screenX   Specifies the x-coordinate of the left edge of a window.
screenY   Specifies the y-coordinate of the top edge of a window.
scrollbars   Represents the browser window's scroll bars.
self   A synonym for the current window.
status   Specifies a priority or transient message in the window's status bar.
statusbar   Represents the browser window's status bar.
toolbar   Represents the browser window's toolbar.
top   A synonym for the topmost browser window.
window   A synonym for the current window.

alert(message)   Displays an Alert dialog box with a message and an OK button.
atob(encodedData)   Decodes a string of data which has been encoded using base-64 encoding.
back()   Undoes the last history step in any frame within the top-level window.
blur()   Removes focus from the specified object.
btoa(stringToEncode)   Creates a base-64 encoded string.
captureEvents(eventType1 [|eventTypeN...])   Sets the window or document to capture all events of the specified type.
clearInterval(intervalID)   Cancels a timeout that was set with the setInterval method.
clearTimeout(timeoutID)   Cancels a timeout that was set with the setTimeout method.
close()   Closes the specified window.
confirm(message)   Displays a Confirm dialog box with the specified message and OK and Cancel buttons.
crypto.random(numberOfBytes)   Returns a pseudo-random string whose length is the specified number of bytes.
crypto.signText(text, selectionStyle [, authority1 [, ... authorityN]])   Returns a string of encoded data which represents a signed object.
disableExternalCapture()   Disables external event capturing set by the enableExternalCapture method.
enableExternalCapture()   Allows a window with frames to capture events in pages loaded from different locations (servers).
find([string[, caseSensitive, backward]])   Finds the specified text string in the contents of the specified window.
focus()   Gives focus to the specified object.
history.forward() forward()   Loads the next URL in the history list.
handleEvent(event)   Invokes the handler for the specified event.
home()   Points the browser to the URL specified in preferences as the user's home page.
moveBy(horizontal, vertical)   Moves the window by the specified amounts.
moveTo(x-coordinate, y-coordinate)   Moves the top-left corner of the window to the specified screen coordinates.
open(URL, windowName[, windowFeatures])   Opens a new web browser window.
print()   Prints the contents of the window or frame.
prompt(message[, inputDefault])   Displays a Prompt dialog box with a message and an input field.
releaseEvents(eventType1 [|eventTypeN...])   Sets the window to release captured events of the specified type, sending the event to objects further along the event hierarchy.
resizeBy(horizontal, vertical)   Resizes an entire window by moving the window's bottom-right corner by the specified amount.
resizeTo(outerWidth, outerHeight)   Resizes an entire window to the specified outer height and width.
routeEvent(event)   Passes a captured event along the normal event hierarchy.
scroll()   Depracated.
scrollBy(horizontal, vertical)   Scrolls the viewing area of a window by the specified amount.
scrollTo(x-coordinate, y-coordinate)   Scrolls the viewing area of the window to the specified coordinates, such that the specified point becomes the top-left corner.
setHotKeys(trueOrFalse)   Enables or disables hot keys in a window which does not have menus.
setInterval(expression, msec) setInterval(function, msec[, arg1[, ..., argN]])   Evaluates an expression or calls a function every time a specified number of milliseconds elapses.
setResizable(trueOrFalse)   Specifies whether a user is permitted to resize a window.
setTimeout(expression, msec) setTimeout(function, msec[, arg1[, ..., argN]])   Evaluates an expression or calls a function once after a specified number of milliseconds has elapsed.
setZOptions(windowPosition)   Specifies the z-order stacking behavior of a window.
stop()   Stops the current download.


other objects

event

Created by Communicator when an event occurs.

data   Returns an array of strings containing the URLs of the dropped objects. Passed with the DragDrop event.
height   Represents the height of the window or frame.
layerX   Number specifying either the object width when passed with the resize event, or the cursor's horizontal position in pixels relative to the layer in which the event occurred. Note that layerX is synonymous with x.
layerY   Number specifying either the object height when passed with the resize event, or the cursor's vertical position in pixels relative to the layer in which the event occurred. Note that layerY is synonymous with y.
modifiers   String specifying the modifier keys associated with a mouse or key event. Modifier key values are: ALT_MASK, CONTROL_MASK, SHIFT_MASK, and META_MASK.
pageX   Number specifying the cursor's horizontal position in pixels, relative to the page.
pageY   Number specifying the cursor's vertical position in pixels relative to the page.
screenX   Number specifying the cursor's horizontal position in pixels, relative to the screen.
screenY   Number specifying the cursor's vertical position in pixels, relative to the screen.
target   String representing the object to which the event was originally sent. (All events)
type   String representing the event type. (All events)
which   Number specifying either the mouse button that was pressed or the ASCII value of a pressed key. For a mouse, 1 is the left button, 2 is the middle button, and 3 is the right button.
width   Represents the width of the window or frame.
x   Synonym for layerX.
y   Synonym for layerY.

screen

The JavaScript runtime engine creates the screen object.

availHeight   Specifies the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the Taskbar on Windows.
availLeft   Specifies the x-coordinate of the first pixel that is not allocated to permanent or semipermanent user interface features.
availTop   Specifies the y-coordinate of the first pixel that is not allocated to permanent or semipermanent user interface features.
availWidth   Specifies the width of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the Taskbar on Windows.
colorDepth   The bit depth of the color palette, if one is in use; otherwise, the value is derived from screen.pixelDepth.
height   Display screen height.
pixelDepth   Display screen color resolution (bits per pixel).
width   Display screen width.

style

Created by any of the following properties or methods of the document object: document.classes, document.contextual, document.ids, document.tags

align   Specifies the alignment of an HTML element within its parent.
backgroundColor   Specifies a solid background color for an element.
backgroundImage   Specifies a background image for an HTML element.
borderBottomWidth   Specifies the width of the bottom border of an HTML element.
borderColor   Specifies the color of the border of an HTML element.
borderLeftWidth   Specifies the width of the left border of an HTML element.
borderRightWidth   Specifies the width of the right border of an HTML element.
borderStyle   Specifies the style of border, such as solid or double, around a block-level HTML element.
borderTopWidth   Specifies the width of the top border of an HTML element.
clear   Specifies the sides of an HTML element that allow floating elements.
color   Specifies the color of the text in an HTML element.
display   Overrides the usual display of an element and specifies whether the element appears in line, as a block-level element, or as a block-level list item.
fontFamily   Specifies the font family, such as Helvetica or Arial, for an HTML text element.
fontSize   Specifies the font size for an HTML text element.
fontStyle   Specifies the style of the font of an HTML element.
fontWeight   Specifies the weight of the font of an HTML element.
lineHeight   Specifies the distance between the baselines of two adjacent lines of block-level type.
listStyleType   Specifies the style of bullet displayed for list items.
marginBottom   Specifies the minimal distance between the bottom of an HTML element and the top of an adjacent element.
marginLeft   Specifies the minimal distance between the left side of an HTML element and the right side of an adjacent element.
marginRight   Specifies the minimal distance between the right side of an HTML element and the left side of an adjacent element.
marginTop   Specifies the minimal distance between the top of an HTML element and the bottom of an adjacent element.
paddingBottom   Specifies how much space to insert between the bottom of an element and its content, such as text or an image.
paddingLeft   Specifies how much space to insert between the left side of an element and its content, such as text or an image.
paddingRight   Specifies how much space to insert between the right side of an element and its content, such as text or an image.
paddingTop   Specifies how much space to insert between the top of an element and its content, such as text or an image.
textAlign   Specifies the alignment of an HTML block-level text element.
textDecoration   Specifies special effects, such as blinking, strike-outs, and underlines, added to an HTML text element.
textIndent   Specifies the length of indentation appearing before the first formatted line of a block-level HTML text element.
textTransform   Specifies the case of an HTML text element.
whiteSpace   Specifies whether or not white space within an HTML element should be collapsed.
width   Specifies the width of a block-level HTML element.

borderWidths(top, right, bottom, left)   Specifies the width of the borders of an HTML element.
margins(top, right, bottom, left)   Specifies the minimal distance between the sides of an HTML element and the sides of adjacent elements.
paddings(top, right, bottom, left)   Specifies how much space to insert between the sides of an element and its content, such as text or an image.


References:
Client-Side JavaScript 1.3 Index
Client-Side JavaScript 1.3 Guide
Client-Side JavaScript 1.3 Reference
Last Modified on 2004-06-14, Qindex.info