| Version 9708
There are many incompatibilities among the various implementations
of JavaScript. This applies both to differences between Netscape
and Microsoft implementations and among the various implementations
by each of these companies. With the mix of browsers in use, these
differences must be attended to or scripts may not work for a
significant portion of the Web users. My general advice is to
always check your scripts with the two worst-case browsers:
Netscape Navigator 2 and Microsoft Internet Explorer 3. For really
critical pages (like a corporate home page), check your scripts
with as many browsers as you can.
In the material below, superscripts indicate what version the
feature was first implemented in. Red subscripts indicate which
versions have known problems with the feature. NS stands for Netscape
and IE stands for Microsoft Internet Explorer.
If you have questions or comments, join into the discussion
in the Site Development section of our Net
Commerce Community.
script NS2
NS2
- <script>
- NS2: Cannot appear in the body, only the head, in NS2
JavaScript NS2
- <script language="JavaScript">
- Runs script only if browser supports language version.
JavaScript1.1 NS3
NS2 IE3
- <script language="JavaScript1.1">
- Runs script only if browser supports language version.
JavaScript1.2 NS4
NS2 NS3 IE3
- <script language="JavaScript1.2">
- Runs script only if browser supports language version.
JScript1.1 IE4
NS2 NS3 NS4 IE3
- <script language="JScript1.1">
- Runs script only if browser supports language version.
- IE3: Version of JScript implemented on IE3 but IE3 does not
recognize attribute.
JScript1.2 IE4
NS2 NS3 NS4 IE3
- <script language="JScript1.2">
- Runs script only if browser supports language version.
abs NS2
- Math.abs(number)
- Returns the absolute value of a number.
acos NS2
- Math.acos(number)
- Returns the arc cosine (in radians) of a number.
action NS2
- formName.action
- A string specifying a destination URL for form data that
is submitted.
alert NS2
- alert("message")
- Displays an Alert dialog box with a message and an OK button.
alinkColor NS2
- document.alinkColor
- A string specifying the color of an active link (after mouse-button
down, but before mouse-button up).
anchor method NS2
- text.anchor(nameAttribute)
- Creates an HTML anchor that is used as a hypertext target.
Anchor object NS2
- A place in a document that is the target of a hypertext link.
anchors
- An array of objects corresponding to named anchors in source
order. See the Anchor object for information.
appCodeName NS2
- navigator.appCodeName
- A string specifying the code name of the browser.
Applet NS3
IE3 NS2
- To use an applet object:document.applets[index]
- Includes a Java applet in a web page.
applets
- An array reflecting all the applets in a document in source
order. See the Applet object for information.
appName NS2
- navigator.appName
- A string specifying the name of the browser.
appVersion NS2
- navigator.appVersion
- A string specifying version information for the Navigator.
Area
- Defines an area of an image as an image map. When the user
clicks the area, the area's hypertext reference is loaded into
its target window. Area objects are a type of Link object. For
information on Area objects, see Link object.
arguments array NS2
- To use the arguments array:1. functionName.arguments[index]2.
functionName.arguments.length
- An array corresponding to elements of a function.
arguments property
- An array of elements in a function. See the arguments array
for information.
Array NS3
IE3 NS2
- To create an Array object:1. arrayObjectName = new Array([arrayLength])2.
arrayObjectName = new Array([element0, element1, ..., elementn])To
use Array objects:1. arrayObjectName.propertyName2. arrayObjectName.methodName(parameters)
- Lets you create arrays and work with them.
asin NS2
- Math.asin(number)
- Returns the arc sine (in radians) of a number.
atan NS2
- Math.atan(number)
- Returns the arc tangent (in radians) of a number.
atan2 NS2
- Math.atan2(x,y)
- Returns the angle in radians from the X axis to a point.
back NS2
- history.back()
- Loads the previous URL in the history list.
bgColor NS2
- document.bgColor
- A string specifying the color of the document background.
big NS2
- stringName.big()
- Causes a string to be displayed in a big font as if it were
in a <BIG> tag.
blink NS2 NS3
- stringName.blink()
- Causes a string to blink as if it were in a <BLINK>
tag.
- NS3: method of Button, Checkbox, FileUpload, Frame, Radio,
Reset, Submit and window
blur NS2
- 1. fileUploadName.blur()2. passwordName.blur()3. selectName.blur()4.
textName.blur()5. textareaName.blur()6. frameReference.blur()7.
windowReference.blur()
- Removes focus from the specified object.
bold NS2
- stringName.bold()
- Causes a string to be displayed as bold as if it were in
a <B> tag.
Boolean NS3
- To create a Boolean object:booleanObjectName = new Boolean(value)To
use a Boolean object:booleanObjectName.propertyName
- Lets you work with Boolean values. The Boolean object is
an object wrapper for a boolean value.
border NS3
IE3 NS2
- imageName.border
- A string specifying the width, in pixels, of an image border.
Button NS2 NS3
- To use a Button object's properties and methods:1. buttonName.propertyName2.
buttonName.methodName(parameters)3. formName.elements[index].propertyName4.
formName.elements[index].methodName(parameters)
- A pushbutton on an HTML form.
- NS3: added type property; added onBlur and onFocus event
handlers; added blur and focus methods
caller NS2
- functionName.caller
- Returns the name of the function that invoked the currently
executing function.
ceil NS2
- Math.ceil(number)
- Returns the least integer greater than or equal to a number.
charAt NS2
- stringName.charAt(index)
- Returns the character at the specified index.
Checkbox NS2 NS3
- To use a Checkbox object's properties and methods:1. checkboxName.propertyName2.
checkboxName.methodName(parameters)3. formName.elements[index].propertyName4.
formName.elements[index].methodName(parameters)
- A checkbox on an HTML form. A checkbox is a toggle switch
that lets the user set a value on or off.
- NS3: added type property; added onBlur and onFocus event
handlers; added blur and focus methods
checked NS2
- 1. checkboxName.checked2. radioName[index].checked
- A Boolean value specifying the selection state of a Checkbox
object or radio button.
clearTimeout NS2
- clearTimeout(timeoutID)
- Cancels a timeout that was set with the setTimeout method.
click
- 1. buttonName.click()2. radioName[index].click()3. checkboxName.click()
- Simulates a mouse-click on the calling form element.
close (document object) NS2
- document.close()
- Closes an output stream and forces data sent to layout to
display.
close (window object) NS2 NS3
- windowReference.close()
- Closes the specified window.
- NS3: closes only windows opened by JavaScript. In previous
release, the close method closed any window.
closed NS3
- [windowReference.]closed
- Specifies whether a window is closed.
complete NS3
IE3 NS2
- imageName.complete
- A boolean value that indicates whether Navigator has completed
its attempt to load an image.
confirm NS2
- confirm("message")
- Displays a Confirm dialog box with the specified message
and OK and Cancel buttons.
constructor NS3
IE3 NS2
- objectType.constructor
- Specifies the function that creates an object prototype.
cookie NS2
- document.cookie
- String value of a cookie, which is a small piece of information
stored by the Navigator in the cookies.txt file.
cos NS2
- Math.cos(number)
- Returns the cosine of a number.
current NS3
IE3 NS2
- history.current
- A string specifying the complete URL of the current history
entry.
Date NS2 NS3
- To create a Date object:1. dateObjectName = new Date()2.
dateObjectName = new Date("month day, year hours:minutes:seconds")3.
dateObjectName = new Date(year, month, day)4. dateObjectName
= new Date(year, month, day, hours, minutes, seconds)To use
a Date o
- Lets you work with dates and times.
- NS3: added prototype property
defaultChecked NS2
- 1. checkboxName.defaultChecked2. radioName[index].defaultChecked
- A Boolean value indicating the default selection state of
a checkbox or radio button.
defaultSelected NS2 NS3
- selectName.options[index].defaultSelectedoptionName.defaultSelected
- A Boolean value indicating the default selection state of
an option in a Select object.
- NS3: property of Option object
defaultStatus NS2
- windowReference.defaultStatus
- The default message displayed in the status bar at the bottom
of the window.
defaultValue NS2
- 1. passwordName.defaultValue2. textName.defaultValue3. textareaName.defaultValue
- A string indicating the default value of a Password, Text,
or Textarea object.
description NS3
IE3 NS2
- 1. navigator.mimeTypes[index1].description2. navigator.plugins[index2].description
- A description of a MIME type or plug-in.
document NS2 NS3
- To use a document object's properties and methods:1. document.propertyName2.
document.methodName(parameters)
- Contains information on the current document, and provides
methods for displaying HTML output to the user.
- NS3: added onBlur and onFocus syntax; added applets, domain,
embeds, and images properties; added Applet, Area, Image, and
Plugin objects as properties
domain NS3
IE3 NS2
- document.domain
- Specifies the domain name of the server that served a document.
E NS2
- Math.E
- Euler's constant and the base of natural logarithms, approximately
2.718.
elements array NS2
- 1. formName.elements[index]2. formName.elements.length
- An array of objects corresponding to form elements (such
as checkbox, radio, and Text objects) in source order.
elements property
- An array of objects corresponding to form elements (such
as Checkbox, Radio, and Text objects) in source order. See the
elements array for information.
embeds array NS3
IE3 NS2
- An array reflecting all the <EMBED> tags in a document
in source order.
enabledPlugin NS3
IE3 NS2
- navigator.mimeTypes[index].enabledPlugin
- The Plugin object for the plug-in that is configured for
the specified MIME type.
encoding NS2
- formName.encoding
- A string specifying the MIME encoding of the form.
escape NS2
- escape("string")
- Returns the ASCII encoding of an argument in the ISO Latin-1
character set.
eval NS2 NS3
- [objectName.]eval(string)
- The eval method evaluates a string of JavaScript code in
the context of the specified object.
- NS2: a built-in JavaScript function, not associated with
any object, but part of the language itselfNS3: a method of
every object
exp NS2
- Math.exp(number)
- Returns enumber, where number is the argument, and e is Euler's
constant, the base of the natural logarithms.
fgColor NS2
- document.fgColor
- A string specifying the color of the document (foreground)
text.
filename NS3
IE3 NS2
- 1. navigator.plugins[index].filename2. navigator.plugins[pluginName].filename
- The name of a plug-in file on disk.
FileUpload NS3
IE3 NS2
- To use a FileUpload object's properties and methods:fileUploadName.propertyNamefileUploadName.methodName
- A file upload element on an HTML form. A file upload element
lets the user supply a file as input.
fixed NS2
- stringName.fixed()
- Causes a string to be displayed in fixed-pitch font as if
it were in a <TT> tag.
floor NS2
- Math.floor(number)
- Returns the greatest integer less than or equal to a number.
focus NS2 NS3
IE3
- 1. fileUploadName.focus()2. passwordName.focus()3. selectName.focus()4.
textName.focus()5. textareaName.focus()6. frameReference.focus()7.
windowReference.focus()
- Gives focus to the specified object.
- NS3: method of Button, Checkbox, FileUpload, Frame, Radio,
Reset, Submit and window
fontcolor NS2
- stringName.fontcolor(color)
- Causes a string to be displayed in the specified color as
if it were in a <FONT COLOR=color> tag.
fontsize NS2
- stringName.fontsize(size)
- Causes a string to be displayed in the specified font size
as if it were in a <FONTSIZE=size> tag.
Form object NS2 NS3
- To use a Form object's properties and methods:1. formName.propertyName2.
formName.methodName(parameters)3. forms[index].propertyName4.
forms[index].methodName(parameters)
- Lets users input text and make choices from Form elements
such as checkboxes, radio buttons, and selection lists. You
can also use a form to post data to a server.
- NS3: added FileUpload object as property; added reset method;
added onReset event handler
form property NS2
- this.formobjectReference.form
- An object reference specifying the form containing an object.
forms
- An array of objects corresponding to the forms (<FORM>
tags) in a document in source order. See the Form object for
information.
forward NS2
- history.forward()
- Loads the next URL in the history list.
Frame NS2 NS3
- To use a Frame object's properties:1. [windowReference.]frameName.propertyName2.
[windowReference.]frames[index].propertyName3. window.propertyName4.
self.propertyName5. parent.propertyNameTo define an onBlur or
onFocus event handler for a frame (for fram
- A window that can display multiple, independently scrollable
frames on a single screen, each with its own distinct URL. Frames
can point to different URLs and be targeted by other URLs, all
within the same screen. A series of frames makes up a page.
- NS3: added blur and focus methods; added onBlur and onFocus
event handlers
frames
- An array of objects corresponding to child frames (<FRAME>
tag) in source order. See the Frame object for information.
Function NS3
IE3 NS2
- To create a Function object:functionObjectName = new Function
([arg1, arg2, ... argn], functionBody)To use a Function object:functionObjectName.propertyName
- Specifies a string of JavaScript code to be compiled as a
function.
getDate NS2
- dateObjectName.getDate()
- Returns the day of the month for the specified date.
getDay NS2
- dateObjectName.getDay()
- Returns the day of the week for the specified date.
getHours NS2
- dateObjectName.getHours()
- Returns the hour for the specified date.
getMinutes NS2
- dateObjectName.getMinutes()
- Returns the minutes in the specified date.
getMonth NS2
- dateObjectName.getMonth()
- Returns the month in the specified date.
getSeconds NS2
- dateObjectName.getSeconds()
- Returns the seconds in the current time.
getTime NS2
- dateObjectName.getTime()
- Returns the numeric value corresponding to the time for the
specified date.
getTimezoneOffset NS2
- dateObjectName.getTimezoneOffset()
- Returns the time-zone offset in minutes for the current locale.
getYear NS2
- dateObjectName.getYear()
- Returns the year in the specified date.
go NS2
IE3
- history.go(delta
- Loads a URL from the history list.
hash NS2 NS3
- 1. links[index].hash2. location.hash3. areaName.hash
- A string beginning with a hash mark (#) that specifies an
anchor name in the URL.
- NS3: property of Area
height NS3
IE3 NS2
- imageName.height
- A string specifying the height of an image in pixels.
Hidden NS2 NS3
- To use a Hidden object's properties:1. hiddenName.propertyName2.
formName.elements[index].propertyName
- A Text object that is suppressed from form display on an
HTML form. A Hidden object is used for passing name/value pairs
when a form submits.
- NS3: added type property
history array
- An array reflecting all the history entries in a window in
source order. See the history object for information.
history object NS2 NS3
- To use a history object:1. history.propertyName2. history.methodName(parameters)3.
[windowReference.]history[index]
- Contains information on the URLs that the client has visited
within a window. This information is stored in a history list
and is accessible through the Navigator Go menu.
- NS3: added current, next, and previous properties; added
history array
host NS2 NS3
- 1. links[index].host2. location.host3. areaName.host
- A string specifying the server name, subdomain, and domain
name.
- NS3: property of Area
hostname NS2 NS3
- 1. links[index].hostname2. location.hostname3. areaName.hostname
- A string containing the full hostname of the server, including
the server name, subdomain, domain, and port number.
- NS3: property of Area
href NS2 NS3
- 1. links[index].href2. location.href3. areaName.href
- A string specifying the entire URL.
- NS3: property of Area
hspace NS3
IE3 NS2
- imageName.hspace
- A string specifying a margin in pixels between the left and
right edges of an image and the surrounding text.
Image NS3
IE3 NS2
- To create an Image object:imageName = new Image([width, height])To
use an Image object's properties:1. imageName.propertyName2.
document.images[index].propertyName3. formName.elements[index].propertyNameTo
define an event handler for an Image object creat
- An image on an HTML form.
images
- An array reflecting all the images in a document in source
order. See the Image object for information.
index NS2 NS3
- 1. selectName.options[indexValue].index2. optionName.index
- An integer representing the index of an option in a Select
object.
- NS3: property of Option
indexOf NS2
- stringName.indexOf(searchValue, [fromIndex])
- Returns the index within the calling String object of the
first occurrence of the specified value, starting the search
at fromIndex.
isNaN NS2 NS3
- isNaN(testValue)
- Evaluates an argument to determine if it is "NaN"
(not a number).
- NS3: works on all platforms (in previous releases, worked
only on Unix platforms)
italics NS2
- stringName.italics()
- Causes a string to be italic, as if it were in an <I>
tag.
javaEnabled NS3
IE3 NS2
- navigator.javaEnabled()
- Specifies whether Java is enabled.
join NS3
IE3 NS2
- arrayName.join(separator)
- Joins all elements of an array into a string.
lastIndexOf NS2
- stringName.lastIndexOf(searchValue, [fromIndex])
- Returns the index within the calling String object of the
last occurrence of the specified value. The calling string is
searched backward, starting at fromIndex.
lastModified NS2
- document.lastModified
- A string representing the date that a document was last modified.
length NS2 NS3
- When used with objects:1. formName.length2. frameReference.length3.
history.length4. radioName.length5. selectName.length6. stringName.length7.
windowReference.length8. arrayName.lengthWhen used with array
properties:9. anchors.length10. applet
- An integer that specifies a length-related feature of the
calling object or array.
- NS3: property of applets array, Array object, embeds array,
history array, images array, mimeTypes array, plugins array
link method NS2
- linkText.link(hrefAttribute)
- Creates an HTML hypertext link that requests another URL.
Link object NS2 NS3
- To use a Link or Area object's properties:document.links[index].propertyName
- A piece of text, an image, or an area of an image identified
as a hypertext link. When the user clicks the link text, image,
or area, the link hypertext reference is loaded into its target
window. Area objects are a type of Link object.
- NS3: added onMouseOut event handler; added Area objects;
links array contains areas created with <AREA HREF="...">
linkColor NS2
- document.linkColor
- A string specifying the color of the document hyperlinks.
links
- An array of objects corresponding to Area and Link objects
in source order. See the Link object for information.
LN10 NS2
- Math.LN10
- The natural logarithm of 10, approximately 2.302.
LN2 NS2
- Math.LN2
- The natural logarithm of two, approximately 0.693.
location NS2 NS3
- To use a location object:[windowReference.]location[.propertyName][windowReference.]location.methodName(parameters)
- Contains information on the current URL.
- NS3: added reload, replace methods; changed the way documents
are loaded when location is set
log NS2
- Math.log(number)
- Returns the natural logarithm (base e) of a number.
LOG10E NS2
- Math.LOG10E
- The base 10 logarithm of e (approximately 0.434).
LOG2E NS2
- Math.LOG2E
- The base 2 logarithm of e (approximately 1.442).
lowsrc NS3
IE3 NS2
- imageName.lowsrc
- A string specifying the URL of a low-resolution version of
an image to be displayed in a document.
Math NS2
- To use a Math object:1. Math.propertyName2. Math.methodName(parameters)
- A built-in object that has properties and methods for mathematical
constants and functions. For example, the Math object's PI property
has the value of pi.
max NS2
- Math.max(number1, number2)
- Returns the greater of two numbers.
MAX_VALUE NS3
IE3 NS2
- Number.MAX_VALUE
- The maximum numeric value representable in JavaScript.
method NS2
- formName.method
- A string specifying how form field input information is sent
to the server.
MimeType NS3
IE3 NS2
- To use a MimeType object:navigator.mimeTypes[index].propertyName
- A MIME type (Multipart Internet Mail Extension) supported
by the client.
mimeTypes
- An array of all MIME types supported by the client. See the
MimeType object for information.
min NS2
- Math.min(number1, number2)
- Returns the lesser of two numbers.
MIN_VALUE NS3
IE3 NS2
- Number.MIN_VALUE
- The smallest positive numeric value representable in JavaScript.
name NS2 NS3
- 1. objectName.name2. frameReference.name3. frameReference.frames.name4.
radioName[index].name5. imageName.name6. navigator.plugins[index].name7.
windowReference.name8. windowReference.frames.name
- A string specifying the name of an object.
- NS3: property of FileUpload, Form, Image, and Plugin objects
NaN NS3
IE3 NS2
- Number.NaN
- A special value representing Not-A-Number. This value is
represented as the unquoted literal NaN.
navigator NS2 NS3
- To use a navigator object:1. navigator.propertyName2. navigator.methodName
- Contains information about the version of Navigator in use.
- NS3: added mimeTypes, plugins properties; added javaEnabled
method
Navigator JavaScript reference
NS2
NEGATIVE_INFINITY NS3
IE3 NS2
- Number.NEGATIVE_INFINITY
- A special numeric value representing negative infinity. This
value is represented as "-Infinity".
next NS3
IE3 NS2
- history.next
- A string specifying the complete URL of the next history
entry.
Number NS3
IE3 NS2
- To create a Number object:numberObjectName = new Number()To
use a Number object:numberObjectName.propertyName
- Lets you work with numeric values. The Number object is an
object wrapper for primitive numeric values.
onAbort NS3
IE3 NS2
- An abort event occurs when the user aborts the loading of
an image (for example by clicking a link or clicking the Stop
button). The onAbort event handler executes JavaScript code
when an abort event occurs.See the relevant objects for the
onBlur NS2 NS3
- A blur event occurs when a form element loses focus or when
a window or frame loses focus. The blur event can result from
a blur method or from the user clicking the mouse on another
object or window or tabbing with the keyboard. The onBlur
- NS3: event handler of Button, Checkbox, FileUpload, Frame,
Password, Radio, Reset, Submit, and window
onChange NS2 NS3
- A change event occurs when a select, text, or textarea field
loses focus and its value has been modified. The onChange event
handler executes JavaScript code when a change event occurs.Use
the onChange event handler to validate data after i
- NS3: event handler of FileUpload
onClick NS2 NS3
- A click event occurs when an object on a form is clicked.
The onClick event handler executes JavaScript code when a click
event occurs.For checkboxes, links, radio buttons, reset buttons,
and submit buttons, the onClick event handler can re
- NS3: added the ability to return false to cancel the action
associated with a click event
onError NS3
IE3 NS2
- An error event occurs when the loading of a document or image
causes an error. The onError event handler executes JavaScript
code when an error event occurs.An error event occurs only when
a JavaScript syntax or runtime error occurs, not wh
onFocus NS2 NS3
- A focus event occurs when a window, frame, or frameset receives
focus or when a form element receives input focus. The focus
event can result from a focus method or from the user clicking
the mouse on an object or window or tabbing with the
- NS3: event handler of Button, Checkbox, FileUpload, Frame,
Password, Radio, Reset, Submit, and window
onLoad NS2 NS3
- A load event occurs when Navigator finishes loading a window
or all frames within a <FRAMESET> tag. The onLoad event
handler executes JavaScript code when a load event occurs.Use
the onLoad event handler within either the BODY or the
- NS3: event handler of Image
onMouseOut NS3
IE3 NS2
- A mouseOut event occurs each time the mouse pointer leaves
an area (client-side image map) or link from inside that area
or link. The onMouseOut event handler executes JavaScript code
when a mouseOut event occurs.If the mouse moves from one
onMouseOver NS2 NS3
- A mouseOver event occurs once each time the mouse pointer
moves over an object or area from outside that object or area.
The onMouseOver event handler executes JavaScript code when
a mouseOver event occurs.If the mouse moves from one area i
- NS3: event handler of Area
onReset NS3
IE3 NS2
- A reset event occurs when a user resets a form (clicks a
Reset button). The onReset event handler executes JavaScript
code when a reset event occurs.See the relevant objects for
the onReset syntax.
onSelect NS2
- A select event occurs when a user selects some of the text
within a text or textarea field. The onSelect event handler
executes JavaScript code when a select event occurs.See the
relevant objects for the onSelect syntax.
onSubmit NS2
- A submit event occurs when a user submits a form. The onSubmit
event handler executes JavaScript code when a submit event occurs.You
can use the onSubmit event handler to prevent a form from being
submitted; to do so, put a return statement
onUnload NS2
- An unload event occurs when you exit a document. The onUnload
event handler executes JavaScript code when an unload event
occurs.Use the onUnload event handler within either the BODY
or the <FRAMESET> tag, for example, <BODY onUnlo
open (document object) NS2 NS3
- document.open(["mimeType"])[windowReference.]document.open("text/html","replace")
- Opens a stream to collect the output of write or writeln
methods.
- NS3: added "replace" parameter; document.open()
or document.open("text/html") clears the current document
if it has finished loading
open (window object) NS2
IE3
- [windowVar = ][window].open("URL", "windowName",
["windowFeatures"])
- Opens a new web browser window.
opener NS3
IE3 NS2
- window.opener
- Specifies the window of the calling document when a window
is opened using the open method.
Option
- A Select object option created using the Option() constructor.
For information, see the Select object.
options
IE3
- An array corresponding to options in a Select object (OPTION
tags) in source order. See the Select object.
parent NS2
- 1. parent.propertyName2. parent.methodName3. parent.frameName4.
parent.frames[index]
- The parent property is a synonym for a window or frame whose
frameset contains the current frame.
parse NS2
- Date.parse(dateString)
- Returns the number of milliseconds in a date string since
January 1, 1970, 00:00:00, local time.
parseFloat NS2 NS3
- parseFloat(string)
- Parses a string argument and returns a floating point number.
- NS3: returns "NaN" on all platforms if the first
character of the string specified in parseFloat(string) cannot
be converted to a number. In previous releases, it returned
"NaN" on Solaris and Irix and zero on all other platforms.
parseInt NS2 NS3
- parseInt(string [,radix])
- Parses a string argument and returns an integer of the specified
radix or base.
- NS3: returns "NaN" on all platforms if the first
character of the string specified in parseInt(string) cannot
be converted to a number. In previous releases, it returned
"NaN" on Solaris and Irix and zero on all other platforms.
Password NS2 NS3
- To use a Password object's properties and methods:1. passwordName.propertyName2.
passwordName.methodName(parameters)3. formName.elements[index].propertyName4.
formName.elements[index].methodName(parameters)
- A text field on an HTML form that conceals its value by displaying
asterisks (*). When the user enters text into the field, asterisks
(*) hide entries from view.
- NS3: added type property; added onBlur and onFocus event
handlers
pathname NS2 NS3
- 1. links[index].pathname2. location.pathname3. areaName.pathname
- A string specifying the url-path portion of the URL.
- NS3: property of Area
PI NS2
- Math.PI
- The ratio of the circumference of a circle to its diameter,
approximately 3.14159.
Plugin NS3
IE3 NS2
- To use a Plugin object:1. navigator.plugins[index].propertyName2.
navigator.plugins[pluginIndex][mimeTypeIndex].mimeTypePropertyName
- A plug-in module installed on the client.
plugins
- An array of all plug-ins currently installed on the client.
See the Plugin object for information.
port NS2 NS3
- 1. links[index].port2. location.port3 areaName.port
- A string specifying the communications port that the server
uses for communications.
- NS3: property of Area
POSITIVE_INFINITY NS3
IE3 NS2
- Number.POSITIVE_INFINITY
- A special numeric value representing infinity. This value
is represented as "Infinity".
pow NS2
- Math.pow(base, exponent)
- Returns base to the exponent power, that is, baseexponent.
previous NS3
IE3 NS2
- history.previous
- A string specifying the complete URL of the previous history
entry.
prompt NS2
- prompt(message, [inputDefault])
- Displays a Prompt dialog box with a message and an input
field.
protocol NS2 NS3
- 1. links[index].protocol2. location.protocol3 areaName.protocol
- A string specifying the beginning of the URL, up to and including
the first colon.
- NS3: property of Area
prototype NS3
IE3 NS2
- objectType.prototype.propertyName = value
- Defines a property that is shared by all objects of the specified
type.
Radio NS2 NS3
- To use a radio button's properties and methods:1. radioName[index1].propertyName2.
radioName[index1].methodName(parameters)3. formName.elements[index2].propertyName4.
formName.elements[index2].methodName(parameters)
- A set of radio buttons on an HTML form. The user can use
a set of radio to choose one item from a list.
- NS3: added type property; added blur and focus methods
random NS2 NS3
- Math.random()
- Returns a pseudo-random number between zero and one. The
random number generator is seeded from current time, as in Java.
- NS3: works on all platforms. In previous releases, it worked
on Unix platforms only.
referrer NS2
- document.referrer
- Specifies the URL of the calling document when a user clicks
a link.
refresh NS3
IE3 NS2
- navigator.plugins.refresh([true
- Makes newly installed plug-ins available, updates related
arrays such as the plugins array, and optionally reloads open
documents that contain plug-ins.
reload NS3
IE3 NS2
- location.reload([true])
- Forces a reload of the window's current document.
replace NS3
IE3 NS2
- location.replace("URL")
- Loads the specified URL over the current history entry.
reset method NS3
IE3 NS2
- formName.reset()
- Simulates a mouse click on a reset button for the calling
form.
Reset object NS2 NS3
- To use a Reset object's properties and methods:1. resetName.propertyName2.
resetName.methodName(parameters)3. formName.elements[index].propertyName4.
formName.elements[index].methodName(parameters)
- A reset button on an HTML form. A reset button resets all
elements in a form to their defaults.
- NS3: added type property; added onBlur and onFocus event
handlers; added blur and focus methods
reverse NS3
IE3 NS2
- arrayName.reverse()
- Transposes the elements of an array: the first array element
becomes the last and the last becomes the first.
round NS2
- Math.round(number)
- Returns the value of a number rounded to the nearest integer.
scroll NS3
IE3 NS2
- windowReference.scroll(x-coordinate,y-coordinate)
- Scrolls a window to a specified coordinate.
search NS2 NS3
- 1. links[index].search2. location.search3. areaName.search
- A string beginning with a question mark that specifies any
query information in the URL.
- NS3: property of Area
select method NS2
- 1. passwordName.select()2. textName.select()3. textareaName.select()
- Selects the input area of the specified Password, Text, or
Textarea object.
Select object NS2 NS3
- To create an option to add to an existing Select object:optionName
= new Option([text, value, defaultSelected, selected])To add
the new option to an existing Select object:selectName.options[index1]=optionNameTo
delete an option from a Select object:selec
- A selection list on an HTML form. The user can choose one
or more items from a selection list.
- NS3: text property can be changed to change the text of an
option; added type property; added Option() constructor and
all its properties; added the ability to add and delete options
selected NS2 NS3
- 1. selectName.options[index].selected2. optionName.selected
- A Boolean value indicating whether an option in a Select
object is selected.
- NS3: property of Option
selectedIndex NS2
- 1. selectName.selectedIndex2. selectName.options.selectedIndex
- An integer specifying the index of the selected option in
a Select object.
self NS2
- 1. self.propertyName2. self.methodName
- The self property is a synonym for the current window or
frame.
setDate NS2
- dateObjectName.setDate(dayValue)
- Sets the day of the month for a specified date.
setHours NS2
- dateObjectName.setHours(hoursValue)
- Sets the hours for a specified date.
setMinutes NS2
- dateObjectName.setMinutes(minutesValue)
- Sets the minutes for a specified date.
setMonth NS2
- dateObjectName.setMonth(monthValue)
- Sets the month for a specified date.
setSeconds NS2
- dateObjectName.setSeconds(secondsValue)
- Sets the seconds for a specified date.
setTime NS2
- dateObjectName.setTime(timevalue)
- Sets the value of a Date object.
setTimeout NS2
- timeoutID=setTimeout(expression, msec)
- Evaluates an expression after a specified number of milliseconds
has elapsed.
setYear NS2
- dateObjectName.setYear(yearValue)
- Sets the year for a specified date.
sin NS2
- Math.sin(number)
- Returns the sine of a number.
small NS2
- stringName.small()
- Causes a string to be displayed in a small font, as if it
were in a <SMALL> tag.
sort NS3
IE3 NS2
- arrayName.sort(compareFunction)
- Sorts the elements of an array.
split NS3
IE3 NS2
- stringName.split([separator])
- Splits a String object into an array of strings by separating
the string into substrings.
sqrt NS2
- Math.sqrt(number)
- Returns the square root of a number.
SQRT1_2 NS2
- Math.SQRT1_2
- The square root of one-half; equivalently, one over the square
root of two, approximately 0.707.
SQRT2 NS2
- Math.SQRT2
- The square root of two, approximately 1.414.
src NS3
IE3 NS2
- imageName.src
- A string specifying the URL of an image to be displayed in
a document.
status NS2
- windowReference.status
- Specifies a priority or transient message in the status bar
at the bottom of the window, such as the message that appears
when a mouseOver event occurs over an anchor.
strike NS2
- stringName.strike()
- Causes a string to be displayed as struck-out text, as if
it were in a <STRIKE> tag.
String NS2 NS3
- To create a String object:stringObjectName = new String(string)To
use a String object:1. stringName.propertyName2. stringName.methodName(parameters)
- A series of characters.
- NS3: added String() constructor (in previous releases, you
construct strings by quoting characters); added prototype property;
added split method; added ability to pass strings among scripts
in different windows or frames (in previo
sub NS2
- stringName.sub()
- Causes a string to be displayed as a subscript, as if it
were in a <SUB> tag.
submit method NS2
- formName.submit()
- Submits a form.
Submit object NS2 NS3
- To use a Submit object's properties and methods:1. submitName.propertyName2.
submitName.methodName(parameters)3. formName.elements[index].propertyName4.
formName.elements[index].methodName(parameters)
- A submit button on an HTML form. A submit button causes a
form to be submitted.
- NS3: added type property; added onBlur and onFocus event
handlers; added blur and focus methods
substring NS2
- stringName.substring(indexA, indexB)
- Returns a subset of a String object.
suffixes NS3
IE3 NS2
- navigator.mimeTypes[index].suffixes
- A string listing possible file suffixes (also known as file
name extensions) for the MIME type.
sup NS2
- stringName.sup()
- Causes a string to be displayed as a superscript, as if it
were in a <SUP> tag.
taint NS3
IE3 NS2
- taint(dataElementName)
- Adds tainting to a data element or script.
taintEnabled NS3
IE3 NS2
- navigator.taintEnabled()
- Specifies whether data tainting is enabled.
tan NS2
- Math.tan(number)
- Returns the tangent of a number.
target NS2 NS3
- 1. formName.target2. links[index].target3. areaName.target
- For form, a string specifying the name of the window that
responses go to after a form has been submitted. For link, a
string specifying the name of the window that displays the content
of a clicked hypertext link.
- NS3: property of Area
Text object NS2 NS3
- To use a Text object's properties and methods:1. textName.propertyName2.
textName.methodName(parameters)3. formName.elements[index].propertyName4.
formName.elements[index].methodName(parameters)
- A text input field on an HTML form. The user can enter a
word, phrase, or series of numbers in a text field.
- NS3: added type property
text property NS2 NS3
- 1. selectName.options[index].text2. optionName.text
- A string specifying the text that follows an <OPTION>
tag in a Select object.
- NS3: The text property of the options array can be changed
and the text displayed by the option in the Select object changes.
In previous releases, you could set the text property but the
new value was not reflected in the Select ob
Textarea NS2 NS3
- To use a Textarea object's properties and methods:1. textareaName.propertyName2.
textareaName.methodName(parameters)3. formName.elements[index].propertyName4.
formName.elements[index].methodName(parameters)
- A multiline input field on an HTML form. The user can use
a textarea field to enter words, phrases, or numbers.
- NS3: added type property
title NS2
- document.title
- A string representing the title of a document.
toGMTString NS2
- dateObjectName.toGMTString()
- Converts a date to a string, using the Internet GMT conventions.
toLocaleString NS2
- dateObjectName.toLocaleString()
- Converts a date to a string, using the current locale's conventions.
toLowerCase NS2
- stringName.toLowerCase()
- Returns the calling string value converted to lowercase.
top NS2
- 1. top.propertyName2. top.methodName3. top.frameName4. top.frames[index]
- The top property is a synonym for the top-most Navigator
window, which is a "document window" or "Web
Browser window."
toString NS2 NS3
- objectName.toString()numberObjectName.toString([radix])
- Returns a string representing the specified object.
- NS3: added radix
toUpperCase NS2
- stringName.toUpperCase()
- Returns the calling string value converted to uppercase.
type NS3
IE3 NS2
- 1. objectName.type2. navigator.mimeTypes[index].type
- For form elements created with the <INPUT>, <SELECT>,
or <TEXTAREA> tags, a string specifying the type of form
element. For MimeType objects, the a string specifying the name
of the MIME type.
unescape NS2
- unescape("string")
- Returns the ASCII string for the specified value.
untaint NS3
IE3 NS2
- untaint(dataElementName)
- Removes tainting from a data element or script.
URL NS2
- document.URL
- A string specifying the complete URL of the document.
userAgent NS2
- navigator.userAgent
- A string representing the value of the user-agent header
sent in the HTTP protocol from client to server.
UTC NS2
- Date.UTC(year, month, day [, hrs] [, min] [, sec])
- Returns the number of milliseconds in a Date object since
January 1, 1970, 00:00:00, Universal Coordinated Time (GMT).
value NS2 NS3
- 1. objectName.value2. radioName[index].value3. selectName.options.[index].value4.
fileUploadName.value5. optionName.value
- A string that is related to the VALUE attribute of its object.
- NS3: property of FileUpload, Option
valueOf NS3
IE3 NS2
- objectName.valueOf()
- Returns the primitive value of the specified object.
vlinkColor NS2
- document.vlinkColor
- A string specifying the color of visited links.
vspace NS3
IE3 NS2
- imageName.vspace
- A string specifying a margin in pixels between the top and
bottom edges of an image and the surrounding text.
width NS3
IE3 NS2
- imageName.width
- A string specifying the width of an image in pixels.
window object NS2 NS3
- To define a window, use the open method:windowVar = window.open("URL",
"windowName" [,"windowFeatures"])For details
on defining a window, see the open (window object) method.To
use a window object's properties and methods: 1. window.propertyName
2. window
- The top-level object for each document, location, and history
object group.
- NS3: added closed and opener properties; added blur, focus,
and scroll methods; added onBlur, onError, and onFocus event
handlers
window property NS2
- 1. window.propertyName2. window.methodName
- The window property is a synonym for the current window or
frame.
write NS2 NS3
- document.write(expression1 [,expression2], ...[,expressionN])
- Writes one or more HTML expressions to a document in the
specified window.
- NS3: users can print and save generated HTML using the commands
on the File menu
writeln NS2 NS3
- document.writeln(expression1 [,expression2], ...[,expressionN])
- Writes one or more HTML expressions to a document in the
specified window and follows them with a newline character.
- NS3: users can print and save generated HTML using the commands
on the File menu
©1997, Harry Tennant & Associates |