Object structures in JavaScript: complete interactive reference

Object structures in JavaScript: complete interactive reference

Originally taken from here and recorded here for fast and quick reference, all applauses goes to How to create a website.

This page gives a list of objects properties collections and methods for documents and
JavaScript components. Some browsers may provide additional properties or methods but as
this tutorial is intended to teach you how to program so that your scripts work in ALL the
possible (so-called ‘version 4’) browsers, I have given those that are available in all possible browsers or
those which have an alternative, which I will also have given. Besides which, there is very
little that you would want to do that you can’t do with these.

Note, all collections also have the length attribute. Also note, the window is often omitted
when referring to child objects. Also note, Netscape 4 on Linux will not detect any key events
properly. Try not to rely on them.

Standard document components – all addressable components of a web page.
Positioned elements – all addressable components of a <div style=”position:absolute;” …>
Event objects – all accessible information about an event.
Intrinsic objects – variable types with constructors.

Key
Parent object
|-child object
|-child property
|-child object being accessed through a collection[]
|-event
`-method()

Each can be clicked for more information

For items written in the format: ‘methodName([someOtherStuff])’, someOtherStuff is optional and does not need
to be written. The [] brackets must be removed. For items written in the format
‘methodName(type varName)’, ‘type’ gives the type of variable expected by the method or collection,
called varName in this case.

To use this structure to refer to any object, property, collection or method, treat
each new branch level as a new child level. Eg.
window.document.nameOfForm.nameOfInput.defaultValue = ‘I love it’;

Standard document components

window or self  ->  window and self refer to the current web page read-only
|-Array - can be used as a constructor, see below  ->  only useful as a constructor read-only
|-Boolean - can be used as a constructor, see below  ->  only useful as a constructor read-only
|-closed  ->  this will be true if the window is closed (used with window.open()) read-only
|-Date - can be used as a constructor, see below  ->  mostly useful as a constructor read-only
| `-parse(string dateAsAString)  ->  Date.parse(string dateAsAString) converts a string into a UNIX timestamp (milli) accepts almost any valid date and/or time string format
|-defaultStatus  ->  refers to the default message displayed in the status bar read-write
|-document  ->  windowObject.document refers to the body of the web page in a positioned element using separate contents syntax, positionedElementObject.document refers to the body of the positioned element read-only
| |-bgColor - separate contents syntax  ->  refers to the default background colour of the document read-write  for cross-browser scripting, see also document.body.style.backgroundColor document.documentElement.style.backgroundColor
| |-body - in non Netscape 4 compatible, non standards compliant mode browsers  ->  holds information about the body area of the browser window this object may exist without any of its properties existing read-only
| | |-clientHeight  ->  represents the height of the document area of the browser in pixels if window.document.documentElement.clientHeight is being supported at that time, this will be the height of the document content (except in Ice Browser) read-write  for cross-browser scripting, see also window.innerHeight document.documentElement.clientHeight
| | |-clientWidth  ->  represents the width of the document area of the browser in pixels if window.document.documentElement.clientWidth is being supported at that time, this will be the height of the document content (except in Ice Browser) read-write  for cross-browser scripting, see also window.innerWidth document.documentElement.clientWdth
| | |-scrollLeft  ->  represents the horizontal scrolling of the document in pixels if window.document.documentElement.scrollLeft is being supported at that time, this will be 0 (except in Ice Browser) read-write  for cross-browser scripting, see also window.pageXOffset document.documentElement.scrollLeft
| | |-scrollTop  ->  represents the vertical scrolling of the document in pixels if window.document.documentElement.scrollTop is being supported at that time, this will be 0 (except in Ice Browser) read-write  for cross-browser scripting, see also window.pageYOffset document.documentElement.scrollTop
| | `-style - style syntax  ->  if available, this refers to the style of the document read-only
| |   |-background - not Opera 5  ->  refers to the default background style of the document equivalent to backgroundColor in Opera 6 read-write  for cross-browser scripting, see also document.bgColor document.documentElement.style.background
| |   |-backgroundColor - not Opera 5  ->  refers to the default background colour of the document read-write  for cross-browser scripting, see also document.bgColor document.documentElement.style.backgroundColor
| |   `-color  ->  refers to the default colour of the text in the document read-write  for cross-browser scripting, see also document.fgColor document.documentElement.style.color
| |-cookie  ->  string representation of all cookies available to the current web page this can be used to create and read cookies read-write
| |-documentElement - in standards compliant mode browsers  ->  holds information about the body area of the browser window this object may exist without any of its properties existing read-only
| | |-clientHeight  ->  represents the height of the document area of the browser in pixels if window.document.body.clientHeight is being supported at that time, this will be 0 (except in Ice Browser) read-write  for cross-browser scripting, see also window.innerHeight document.body.clientHeight
| | |-clientWidth  ->  represents the width of the document area of the browser in pixels if window.document.body.clientWidth is being supported at that time, this will be 0 (except in Ice Browser) read-write  for cross-browser scripting, see also window.innerWidth document.body.clientwidth
| | |-scrollLeft  ->  represents the horizontal scrolling of the document in pixels if window.document.body.scrollLeft is being supported at that time, this will be 0 (except in Ice Browser) read-write  for cross-browser scripting, see also window.pageXOffset document.body.scrollLeft
| | |-scrollTop  ->  represents the vertical scrolling of the document in pixels if window.document.body.scrollTop is being supported at that time, this will be 0 (except in Ice Browser) read-write  for cross-browser scripting, see also window.pageYOffset document.body.scrollTop
| | `-style - style syntax  ->  if available, this refers to the style of the document read-only
| |   |-background  ->  refers to the default background style of the document read-write  for cross-browser scripting, see also document.bgColor document.body.style.background
| |   |-backgroundColor  ->  refers to the default background colour of the document read-write  for cross-browser scripting, see also document.bgColor document.body.style.backgroundColor
| |   `-color  ->  refers to the default colour of the text in the document read-write  for cross-browser scripting, see also document.fgColor document.body.style.color
| |-domain  ->  string representation of the domain name holding the document representations may vary read-only
| |-fgColor - separate contents syntax  ->  refers to the default colour of the text in the document read-write but becomes read-only after the document has loaded  for cross-browser scripting, see also document.body.style.color document.documentElement.style.color
| |-IdOfPositionedElement - Netscape alternative - see Positioned Element  ->  refers to a positioned element in a Netscape alternative compatible browser read-only  for cross-browser scripting, see also document.layers document.all document.getElementById
| |-lastModified  ->  string representation of the last modified date of the document representations may vary read-only
| |-nameOfForm  ->  refers to a form in the document read-only
| | |-action  ->  refers to the action attribute of a form read-write
| | |-encoding  ->  refers to the enctype attribute of a form read-write
| | |-length  ->  the number of inputs read-only
| | |-method  ->  refers to the method attribute of a form read-write
| | |-name  ->  refers to the name attribute of a form read-write
| | |-nameOfInput/textarea/select or nameOfInputsSharingName[int index]  ->  refers to an input, textarea or select nameOfInput will not work if inputs share a common name, but this branch does give the children of these inputs referred to using the nameOfInputsSharingName collection nameOfInputsSharingName.length gives number of inputs sharing that name, eg. the number of radio input options read-only
| | | |-checked - checkbox or individual radio buttons  ->  boolean: says if a checkbox is checked read-write
| | | |-defaultChecked - checkbox or individual radio buttons  ->  boolean: says if a checkbox will be checked if the form is reset read-write
| | | |-defaultValue - not with select (equivalent to value with radio buttons)  ->  refers to the default value of the input this will be used if the form is reset some browsers do not give this attribute for buttons of any kind read-write
| | | |-disabled  ->  boolean: says if the input is disabled, if the browser supports it Netscape 4 does not support it and Opera 5 will not change the value of the attribute unless the page is refreshed in between (this bug can cause problems) read-write
| | | |-form  ->  refers back to the form containing the input read-only
| | | |-length - select or nameOfInputsSharingName  ->  refers to the number of options or the number of inputs sharing that name read-only
| | | |-name  ->  refers to the name attribute of an input read-write
| | | |-selectedIndex - with select input  ->  the option number currently selected. -1 if none should be read-write but write fails in Internet Explorer 4 so read-only
| | | |-type  ->  refers to the type attribute of an input may be in upper or lower case read-only except for select where type can specify if single ('select-one') or multiple ('select-multiple') options can be selected
| | | |-value - not with select  ->  the current value of an input read-write
| | | |-options[int numberOfOptionWithSelectInput]  ->  refers to an option in a select input read-write selectObject.options.length gives the current number of options read-write create a new option using optionObject = new Option(string text,string value) delete an option by setting it to null
| | | | |-defaultSelected  ->  boolean: says if the input is the one that is selected when the form is reset read-write
| | | | |-index  ->  refers to the number of the option read-only
| | | | |-selected  ->  boolean: says if the option is selected read-write
| | | | |-text  ->  refers to the visible text of an option read-write
| | | | `-value  ->  refers to the value of an option read-write
| | | |-onblur  ->  fires when the input looses focus inputObject.onblur = functionName; read-write
| | | |-onchange  ->  fires when the value of the input changes or a different option is selected inputObject.onchange = functionName; read-write
| | | |-onclick - only on radio, button, submit and reset  ->  fires when the user depresses then releases a mouse button over the input or if the input is activated using the keyboard (whereas mouse event properties are not provided) inputObject.onclick = functionName; read-write
| | | |-ondblclick - only on radio, button, submit and reset  ->  fires when the user depresses then releases a mouse button twice in quick succession over the input inputObject.ondblclick = functionName; it is important to note that browsers on the Mac operating system (as well as a few others) generally do not detect this event for that reason it is best to use this event only to prevent two clicks being counted once it is possible to emulate this event's response using a combination of onclick and window.setTimeout read-write
| | | |-onfocus  ->  fires when the input receives focus inputObject.onfocus = functionName; read-write
| | | |-onkeydown - Partially supported by Netscape 4  ->  fires when the user presses a key down while the input has the focus inputObject.onkeydown = functionName; some versions of Netscape 4 do not react but they will react to document.onkeydown while the input has the focus read-write returning false will prevent the default keydown/press action in most browsers
| | | |-onkeypress - Partially supported by Netscape 4  ->  fires when the user presses and releases a key while the input has the focus inputObject.onkeypress = functionName; some versions of Netscape 4 do not react but they will react to document.onkeypress while the input has the focus read-write returning false will prevent the default keypress action in most browsers
| | | |-onkeyup - Partially supported by Netscape 4  ->  fires when the user releases a key while the input has the focus inputObject.onkeyup = functionName; some versions of Netscape 4 do not react but they will react to document.onkeyup while the input has the focus read-write
| | | |-onmousedown - only on radio, button, submit and reset  ->  fires when the user depresses a mouse button over the input inputObject.onmousedown = functionName; read-write returning false from a right button mousedown will prevent the right click menu from appearing in most browsers some may need you to return false from an oncontextmenu event and some do not detect right clicks
| | | |-onmouseup - only on radio, button, submit and reset  ->  fires when the user releases a mouse button over the input inputObject.onmouseup = functionName; read-write
| | | |-blur()  ->  causes the input to loose focus
| | | |-focus()  ->  causes the input to receive focus
| | | `-select() - text or textarea  ->  causes the text in the input to be selected
| | |-target  ->  refers to the target attribute of a form read-write
| | |-elements[int numberOfInput(not image input)] - children as nameOfInput  ->  refers to an input read-only formObject.elements.length gives the number of inputs read-only
| | |-onreset  ->  fires when the form is reset if you return false, the reset will be cancelled and the form will not be reset inputObject.onreset = functionName; read-write
| | |-onsubmit  ->  fires when the form is submitted if you return false, the submit will be cancelled and the form will not be submitted inputObject.onreset = functionName; read-write
| | |-reset()  ->  causes the form to reset
| | `-submit()  ->  causes the form to be submitted
| |-nameOfImage  ->  refers to an image read-only create a new image (stored in cache) using imageObject = new Image(); imageObject.src = string src;
| | |-border  ->  refers to the border of an image read-only
| | |-complete  ->  boolean: says if an image has completed loading read-only
| | |-height  ->  refers to the height of an image read-only
| | |-lowsrc  ->  refers to the lowsrc of an image read-only
| | |-name  ->  refers to the name of an image read-only
| | |-src  ->  refers to the src of an image read-write
| | |-width  ->  refers to the width of an image read-only
| | |-onabort  ->  fires if the user aborts the loading of that image imageObject.onabort = functionName; read-write
| | |-onerror  ->  fires if the image fails to load due to errors in the image source or if the image cannot be located imageObject.onerror = functionName; read-write
| | |-onload  ->  fires as soon as the image loads imageObject.onload = functionName; read-write
| | |-onmousedown  ->  fires when the user depresses a mouse button over the image imageObject.onmousedown = functionName; read-write returning false from a right button mousedown will prevent the right click menu from appearing in most browsers some may need you to return false from an oncontextmenu event and some do not detect right clicks
| | `-onmouseup  ->  fires when the user releases a mouse button over the image imageObject.onmouseup = functionName; read-write
| |-referrer  ->  the URL of the page that contained a link that the user clicked on to get to this page representations may vary read-only
| |-title  ->  refers to the document title read-only in old browsers read-write in new browsers
| |-URL  ->  the full text of the location as window.location.href except read-only read-only
| |-all[string IdOfpositionedElement] - proprietary DOM - see Positioned Element  ->  refers to a positioned element in a proprietary DOM compatible browser read-only  for cross-browser scripting, see also document.IdOfPositionedElement document.layers document.getElementById
| |-anchors[int numberOfATagWithNameDefined]  ->  refers to an <a ...> tag where the name attribute has been set read-only documentObject.anchors.length gives the current number of anchor elements whose name attribute has been set read-only
| | |-name  ->  refers to the name attribute of an anchor read-write
| | |-offsetLeft - non Netscape 4 compatible  ->  the distance between the left edge of the anchor and the left edge of the DOM parent node see the section on browser specific referencing for how to use this read-only  for cross-browser scripting, see also anchorObject.x
| | |-offsetParent - non Netscape 4 compatible  ->  the DOM parent node - this may be different in different browsers see the section on browser specific referencing for how to use this read-only
| | |-offsetTop - non Netscape 4 compatible  ->  the distance between the top edge of the anchor and the top edge of the DOM parent node see the section on browser specific referencing for how to use this read-only  for cross-browser scripting, see also anchorObject.y
| | |-x - Netscape 4 compatible  ->  the distance between the left edge of the anchor and the left edge of the page read-only  for cross-browser scripting, see also linkObject.offsetLeft recursively with anchorObject.offsetParent
| | `-y - Netscape 4 compatible  ->  the distance between the top edge of the anchor and the top edge of the page read-only  for cross-browser scripting, see also linkObject.offsetTop recursively with anchorObject.offsetParent
| |-applets[int numberOfAppletTag]  ->  refers to an applet in the document read-only
| | |-nameOfPublicProperty  ->  all public properties of the applet are available read-only/read-write
| | `-nameOfPublicMethod()  ->  all public methods of the applet are available read-only/read-write
| |-embeds[nameOrNumberOfEmbeddedObject] - WARNING, can cause error  ->  refers to an embed or object element in the document in Netscape 4, this array requires Java to be enabled if the browser does not have java enabled, the script will produce an error and will abort if you attempt to reference this array if the plugin or the embedded object fails to load, Netscape 4 will produce an error if you attempt to reference the corresponding cell of the embeds array read-only
| | |-height  ->  refers to the height of the embedded object read-only
| | |-hidden  ->  refers to the hidden attribute of the embedded object read-only
| | |-name  ->  refers to the name of the embedded object read-only
| | |-pluginspage  ->  refers to the pluginspage attribute of the embedded object read-write
| | |-src  ->  refers to the src of the embedded object read-write
| | |-type  ->  refers to the data type of the embedded object read-only
| | |-units  ->  refers to the units of the embedded object (usu. 'pixels' in Netscape compatible or 'px' in Internet Explorer compatible) read-only
| | |-width  ->  refers to the width of an the embedded object read-only
| | |-onload  ->  fires as soon as the embedded object loads embeddedObject.onload = functionName; read-write
| | `-nameOfPublicMethod()  ->  all public methods of the embedded object are available these will vary with the plugin type see the plugin provider's page read-only/read-write
| |-forms[int numberOfForm] - children as nameOfForm  ->  refers to a form in the document read-only
| |-images[nameOrNumberOfImage] - children as nameOfImage  ->  refers to an image in the document read-only
| |-layers[string IdOfpositionedElement] - Netscape layers - see Positioned Element  ->  refers to a positioned element in a Netscape layers compatible browser read-only  for cross-browser scripting, see also document.IdOfPositionedElement document.all document.getElementById
| |-links[int numberOfATagWithHrefDefined]  ->  refers to an <a ...> or <area ...> tag where the HREF attribute has been set read-only documentObject.links.length gives the current number of anchor or area elements whose href attribute has been set read-only
| | |-hash  ->  the part of the href after the # symbol (if there is one) the hash symbol is also returned when reading this the hash symbol should not be included when setting this Internet Explorer (Win/Mac), Gecko and iCab return a blank string if hash is just '#' ICEbrowser returns the entire href without the hash read-write
| | |-host  ->  the host name and port number (if there is one) of the href read-write
| | |-hostname  ->  the host name of the href read-write
| | |-href  ->  the full text of the href read-write
| | |-innerText - non Netscape 4 compatible  ->  the visible text of the link read-only  for cross-browser scripting, see also linkObject.text
| | |-offsetLeft - non Netscape 4 compatible  ->  the distance between the left edge of the link and the left edge of the DOM parent node see the section on browser specific referencing for how to use this read-only  for cross-browser scripting, see also linkObject.x
| | |-offsetParent - non Netscape 4 compatible  ->  the DOM parent node - this may be different in different browsers see the section on browser specific referencing for how to use this read-only
| | |-offsetTop - non Netscape 4 compatible  ->  the distance between the top edge of the link and the top edge of the DOM parent node see the section on browser specific referencing for how to use this read-only  for cross-browser scripting, see also linkObject.y
| | |-pathname  ->  the part of the href after the host name eg. subdir1/subdir2/file.html read-write
| | |-port  ->  the port number (if there is one) read-write
| | |-protocol  ->  the protocol used eg. http: read-write
| | |-search  ->  the part of the href after (and containing) the ? symbol, if there is one read-write
| | |-target  ->  the target of the link read-write
| | |-text - Netscape 4 compatible  ->  the visible text of the link read-only a bug in Netscape 4 makes this only available if the name attribute is not set  for cross-browser scripting, see also linkObject.innerText
| | |-x - Netscape 4 compatible  ->  the distance between the left edge of the link and the left edge of the page read-only a bug in Netscape 4 makes this only available if the name attribute is not set if it is, use the x property of the corresponding anchor object  for cross-browser scripting, see also linkObject.offsetLeft recursively with linkObject.offsetParent
| | |-y - Netscape 4 compatible  ->  the distance between the top edge of the link and the top edge of the page read-only a bug in Netscape 4 makes this only available if the name attribute is not set if it is, use the y property of the corresponding anchor object  for cross-browser scripting, see also linkObject.offsetTop recursively with linkObject.offsetParent
| | |-onblur - not with <area ...>  ->  fires when the link looses focus anchorObject.onblur = functionName; read-write
| | |-onclick - not with <area ...>  ->  fires when the user depresses then releases a mouse button over the link or if the link is activated using the keyboard (whereas mouse event properties are not provided) linkObject.onclick = functionName; read-write returning false from a click will prevent the link from being followed
| | |-ondblclick  ->  fires when the user depresses then releases a mouse button twice in quick succession over the link linkObject.ondblclick = functionName; it is important to note that browsers on the Mac operating system (as well as a few others) generally do not detect this event for that reason it is best to use this event only to prevent two clicks being counted once it is possible to emulate this event's response using a combination of onclick and window.setTimeout read-write
| | |-onfocus - not with <area ...>  ->  fires when the link receives focus anchorObject.onfocus = functionName; read-write
| | |-onmousedown - not with <area ...>  ->  fires when the user depresses a mouse button over the link linkObject.onmousedown = functionName; read-write returning false from a right button mousedown will prevent the right click menu from appearing in most browsers some may need you to return false from an oncontextmenu event and some do not detect right clicks
| | |-onmousemove - not with Netscape 4  ->  fires when the user moves the mouse while it is over the link linkObject.onmousemove = functionName; read-write
| | |-onmouseout  ->  fires when the user moves the mouse from over the link to off the link linkObject.onmouseout = functionName; read-write
| | |-onmouseover  ->  fires when the user moves the mouse from off the link to over the link linkObject.onmouseover = functionName; read-write if you set the status using this event, you will need to return true
| | |-onmouseup - not with <area ...>  ->  fires when the user releases a mouse button over the link linkObject.onmouseup = functionName; read-write
| | |-blur() - not in Netscape 4 compatible browsers  ->  causes the link to loose focus check if the method exists before you try to use it if( linkObject.blur ) { linkObject.blur(); }
| | `-focus() - not in Netscape 4 compatible browsers  ->  causes the link to receive focus check if the method exists before you try to use it if( linkObject.focus ) { linkObject.focus(); }
| |-onclick - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user depresses then releases a mouse button over the document documentObject.onclick = functionName; read-write
| |-ondblclick - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user depresses then releases a mouse button twice in quick succession over the document documentObject.ondblclick = functionName; it is important to note that browsers on the Mac operating system (as well as a few others) generally do not detect this event for that reason it is best to use this event only to prevent two clicks being counted once it is possible to emulate this event's response using a combination of onclick and window.setTimeout read-write
| |-onkeydown - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user presses a key down while the document (but not an input) has the focus documentObject.onkeydown = functionName; read-write
| |-onkeypress - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user presses and releases a key down while the document (but not an input) has the focus documentObject.onkeypress = functionName; read-write
| |-onkeyup - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user releases a key while the document (but not an input) has the focus documentObject.onkeyup = functionName; read-write
| |-onmousedown - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user depresses a mouse button over the document documentObject.onmousedown = functionName; read-write returning false from a right button mousedown will prevent the right click menu from appearing in most browsers some may need you to return false from an oncontextmenu event and some do not detect right clicks
| |-onmousemove - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user moves the mouse while it is over the document documentObject.onmousemove = functionName; read-write
| |-onmouseout - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user moves the mouse from over the document to off the document documentObject.onmouseout = functionName; read-write
| |-onmouseover - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user moves the mouse from off the document to over the document documentObject.onmouseover = functionName; read-write
| |-onmouseup - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user releases a mouse button over the document documentObject.onmouseup = functionName; read-write 
| |-captureEvents(Event.EventType)  ->  causes Netscape 4 compatible browsers to react to events see window.Event for what events can be captured
| |-close()  ->  says that you have stopped rewriting the document contents and they should now be displayed
| |-getElementById(string IdOfpositionedElement) - DOM - see Positioned Element  ->  returns a reference to a positioned element in a DOM compatible browser read-only  for cross-browser scripting, see also document.IdOfPositionedElement document.layers document.all
| |-open([string mimeType[,string replace]])  ->  says that you are about to start rewriting the document contents mimeType can be any valid MIME type (default 'text/html') replace is written as the word 'replace' (as a string) if replace is used, the new content replaces the history entry for the old content if replace is used, mimeType must be 'text/html'
| |-write(string content)  ->  writes document content
| `-writeln(string content)  ->  writes a line of document content
|-event - children as event objects section below  ->  if the browser supports it, this holds the instantaneous details of an event see the section on event objects below read-only  for cross-browser scripting, see also event objects using first argument
|-Event - in Netscape 4 compatible browsers  ->  the event capture object provided by Netscape 4 compatible browsers
| |-CLICK  ->  fires when the user depresses then releases a mouse button over the element read-only
| |-DBLCLICK  ->  fires when the user depresses then releases a mouse button twice in quick succession over the element it is important to note that browsers on the Mac operating system (as well as a few others) generally do not detect this event for that reason it is best to use this event only to prevent two clicks being counted once it is possible to emulate this event's response using a combination of onclick and window.setTimeout read-write
| |-KEYDOWN  ->  fires when the user presses a key down while the element has the focus read-only
| |-KEYPRESS  ->  fires when the user presses then releases a key while the element has the focus read-only
| |-KEYUP  ->  fires when the user releases a key while the element has the focus read-only
| |-MOUSEDOWN  ->  fires when the user depresses a mouse button over the element read-only
| |-MOUSEMOVE  ->  fires when the user moves the mouse while it is over the element read-only
| |-MOUSEOUT  ->  fires when the user moves the mouse from over the element to off the element read-only
| |-MOUSEOVER  ->  fires when the user moves the mouse from off the element to over the element read-only
| `-MOUSEUP  ->  fires when the user releases a mouse button over the element read-only
|-Function - can be used as a constructor, see below  ->  only useful as a constructor read-only
|-history  ->  refers to the document history of the browser read-only
| |-back()  ->  loads the last document in the browser history equivalent to clicking the browser's back button
| |-forward()  ->  loads the next document in the browser history equivalent to clicking the browser's forward button
| `-go(int numerToJump)  ->  jumps forward through the browser history by the specified number of entries use -ve numbers for previous documents
|-Image - can be used as a constructor, see below  ->  only useful as a constructor read-only
|-innerHeight  ->  represents the height of the document area of the browser in pixels in Netscape compatible browsers read-only  for cross-browser scripting, see also document.body.clientHeight document.documentElement.clientHeight
|-innerWidth  ->  represents the width of the document area of the browser in pixels in Netscape compatible browsers read-only  for cross-browser scripting, see also document.body.clientWidth document.documentElement.clientWidth
|-length  ->  number of frames held by the current document equivalent to window.frames.length read-only
|-location  ->  holds information about the current location read-only
| |-hash  ->  the part of the location after the # symbol (if there is one) the hash symbol is also returned when reading this the hash symbol should not be included when setting this Internet Explorer (Win/Mac), Gecko and iCab return a blank string if hash is just '#' ICEbrowser returns the entire href without the hash read-write
| |-host  ->  the host name and port number (if there is one) of the location Internet Explorer on windows always shows a port number, even if one is not specified in the href (it does not do this with links) read-write
| |-hostname  ->  the host name of the location read-write
| |-href  ->  the full text of the location read-write
| |-pathname  ->  the part of the location after the host name eg. subdir1/subdir2/file.html read-write
| |-port  ->  the port number (if there is one) read-write
| |-protocol  ->  the protocol used eg. http: read-write
| |-search  ->  the part of the location after (and containing) the ? symbol, if there is one read-write
| |-reload([bool forceFullReload])  ->  reloads the current document if forceFullReload is true, the document will be reloaded from the server, not from cache
| `-replace(string location)  ->  loads the specified URL replacing the current history entry the URL can be relative or absolute
|-Math  ->  an object containing mathematical constants and methods read-only
| |-E  ->  constant e ~= 2.718 read-only
| |-LN2  ->  constant ln(2) ~= 0.693 read-only
| |-LN10  ->  constant ln(10) ~= 2.303 read-only
| |-LOG2E  ->  constant log2(e) ~= 1.442 read-only
| |-LOG10E  ->  constant log10(e) ~= 0.434 read-only
| |-PI  ->  constant Pi ~= 3.142 read-only
| |-SQRT1_2  ->  constant 1/sqrt(2) or sqrt(1/2) ~= 0.707 read-only
| |-SQRT2  ->  constant sqrt(2) ~= 1.414 read-only
| |-abs(number n)  ->  returns the absolute value of n
| |-acos(number n)  ->  returns (rads) cos^-1 of n
| |-asin(number n)  ->  returns (rads) sin^-1 of n
| |-atan(number n)  ->  returns (rads) tan^-1 of n
| |-atan2(number n,number k)  ->  returns the angle (rads) from cartesian coordinates 0,0 to n,k
| |-ceil(number n)  ->  returns n rounded up to the nearest whole number
| |-cos(number n)  ->  returns cos n (where n is in radians)
| |-exp(number n)  ->  returns e to the power of n
| |-floor(number n)  ->  returns n rounded down to the nearest whole number
| |-log(number n)  ->  returns ln(n)
| |-max(number a,number b,number c,.....)  ->  returns the largest number
| |-min(number a,number b,number c,.....)  ->  returns the smallest number
| |-pow(number n,number k)  ->  returns n to the power of k
| |-random()  ->  returns a random number between 0 and 1
| |-round(number n)  ->  returns n rounded up or down to the nearest whole number
| |-sin(number n)  ->  returns sin n (where n is in radians)
| |-sqrt(number n)  ->  returns the square root of n
| `-tan(number n)  ->  returns tan n (where n is in radians)
|-name  ->  refers to the name of the current window used by <a target= ...> read-write
|-navigator  ->  holds information about the user's browser read-only
| |-appCodeName  ->  the code name of the browser read-only
| |-appName  ->  the short name of the browser read-only
| |-appVersion  ->  the version number of the browser read-only
| |-language - Netscape compatible  ->  the user's choice of language for their browser read-only
| |-platform  ->  the operating system the browser is running on read-only
| |-userAgent  ->  the full name of the browser read-only
| |-userLanguage - non Netscape compatible  ->  the user's choice of language for their operating system read-only
| |-mimeTypes[nameOrNumberOfMIMEType] - No entries in Internet Explorer on Windows  ->  contains information about a MIME type supported by the browser Internet Explorer on Windows just gives a 0 length array so just put the object on the page and the user will be prompted to download the relevant plugin if they do not support it yet read-only
| | |-description  ->  the full description of the MIME type read-only
| | |-enabledPlugin  ->  refers to the plugin that supports the MIME type children as for window.navigator.plugins[nameOrNumberOfPlugin] read-only
| | |-suffixes  ->  gives a 'comma-space' separated list of the file extensions covered by the MIME type read-only
| | `-type  ->  gives the official type name of the MIME type eg. image/gif read-only
| |-plugins[nameOrNumberOfPlugin][nameOrNumberOfMIMEType] - As for mimeTypes  ->  contains information about a MIME type supported by the browser children as for window.navigator.mimeTypes[nameOrNumberOfMIMEType] read-only
| |-plugins[nameOrNumberOfPlugin] - No entries in Internet Explorer on Windows  ->  contains information about a plugin Internet Explorer on Windows just gives a 0 length array so just put the object on the page and the user will be prompted to download the plugin if they do not support it yet read-only
| | |-description  ->  the full name of the plugin read-only
| | |-filename  ->  the full name of the plugin file read-only
| | |-length  ->  the number of MIME types supported by the plugin read-only
| | `-name  ->  the short name of the plugin read-only
| |-javaEnabled()  ->  returns if the browser supports Java
| `-taintEnabled()  ->  returns if the browser supports data tainting tainting is not supported by any '4th generation' browsers so this method no longer serves any purpose, although browsers still provide it
|-Number - can be used as a constructor, see below  ->  contains unusual constants and information about the browser's number handling read-only
| |-MAX_VALUE  ->  Number.MAX_VALUE is the highest number that that browser on that operating system can represent read-only
| |-MIN_VALUE  ->  Number.MIN_VALUE is the smallest positive number that that browser on that operating system can represent read-only
| |-NaN  ->  Number.NaN is a non-number equivalent to eg. Math.sqrt(-1) read-only
| |-NEGATIVE_INFINITY  ->  Number.NEGATIVE_INFINITY is a special number representing negative infinity read-only
| `-POSITIVE_INFINITY  ->  Number.POSITIVE_INFINITY is a special number representing positive infinity read-only
|-Object - can be used as a constructor, see below  ->  only useful as a constructor read-only
|-opener  ->  refers to the window that used the window.open method to open this window read-write
|-Option - can be used as a constructor, see below  ->  only useful as a constructor read-only
|-outerHeight  ->  represents the height of the browser window in pixels in Netscape compatible browsers read-only  there is no cross-browser equivalent it is best to use this only to combat resizeTo inconsistencies
|-outerWidth  ->  represents the width of the browser window in pixels in Netscape compatible browsers read-only  there is no cross-browser equivalent it is best to use this only to combat resizeTo inconsistencies
|-pageXOffset - in Netscape 4 compatible browsers  ->  represents the horizontal scrolling of the document in pixels read-write  for cross-browser scripting, see also document.body.scrollLeft document.documentElement.scrollLeft
|-pageYOffset - in Netscape 4 compatible browsers  ->  represents the vertical scrolling of the document in pixels read-write  for cross-browser scripting, see also document.body.scrollTop document.documentElement.scrollTop
|-parent  ->  refers to the parent window in the frameset read-only
|-RegExp - can be used as a constructor, see below  ->  holds information about regular expression searches some browsers fail to implement this correctly (eg. Opera 6- and iCab) read-only
| |-$1 ... $9  ->  RegExp.$1 - RegExp.$9 store the last 9 capture matches found during a regular expression search read-only
| |-input  ->  RegExp.input is the last string that a regular expression search was performed against read-only
| |-lastMatch or $&  ->  RegExp.lastMatch is the last substring that fully matched a regular expression during a match, exec or test read-only
| |-lastParen or $+  ->  RegExp.lastParen is the last instance of any capture during a match, exec or test read-only
| |-leftContext or $`  ->  RegExp.leftContext is the leading substring before the last substring that fully matched a regular expression during a match, exec or test read-only
| |-rightContext or $'  ->  RegExp.rightContext is the trailing substring after the last substring that fully matched a regular expression during a match, exec or test read-only
|-screen  ->  holds information about the user's monitor read-only
| |-availHeight  ->  the available height of the monitor in pixels when the size of the taskbar is taken into account read-only
| |-availWidth  ->  the available width of the monitor in pixels when the size of the taskbar is taken into account read-only
| |-colorDepth  ->  the number of bits per pixel if pixelDepth is not provided read-only  for cross-browser scripting, see also pixelDepth
| |-height  ->  the height of the monitor in pixels read-only
| |-pixelDepth  ->  the number of bits per pixel, if provided read-only  for cross-browser scripting, see also colorDepth
| `-width  ->  the width of the monitor in pixels read-only
|-status  ->  refers to the text written in the status bar of the browser read-write
|-String - can be used as a constructor, see below  ->  mostly useful as a constructor contains useful character method read-only
| `-fromCharCode(number asciiCharacterValue)  ->  returns the character represented by the numerical (ascii) value read-only
|-frames[nameOrNumberOfFrame]  ->  refers to an iframe element or the window object of a page held in the frameset held by this page (you will need to use window.frames[nameOrNumberOfFrame].window to access the window object of the document held in an iframe) read-only windowObject.frames.length gives the number of frames in the frameset held by this page NOTE: attempting to access a frame that does not contain an HTML document or is from a different domain or an iframe that has not loaded will cause errors in most browsers read-only
| `-name  ->  refers to the name of a frame read-write
|-onblur  ->  fires when the window looses focus windowObject.onblur = functionName; read-write
|-onerror  ->  fires when the script produces an error. Setting this prevents the error dialog being displayed windowObject.onerror = functionName; or windowObject.onerror = null; returning true will prevent the error being logged read-write
|-onfocus  ->  fires when the window receives focus windowObject.onfocus = functionName; read-write
|-onload  ->  fires as soon as the page loads windowObject.onload = functionName; do not use self.onload or IE4 will get it wrong read-write
|-onunload  ->  fires just before the page unloads windowObject.onunload = functionName; read-write
|-alert(object)  ->  displays a message box with a textual representation of the object. If the object is a string, the string will be displayed
|-blur()  ->  causes the window to loose focus
|-clearInterval(interval object)  ->  stops the interval from firing again
|-clearTimeout(timeout object)  ->  stops the timeout from firing
|-close()  ->  causes the window to close if the window was not opened by script, the user will be asked if they want the window to close
|-confirm(string message)  ->  displays the message and offers 'OK' and 'Cancel' buttons returns true if the user chooses OK and false if the user chooses Cancel
|-escape(string textToURLEncode)  ->  returns the string URL encoded usually be referred to without 'window.'
|-eval(string scriptToEvaluate)  ->  evaluates the text as a script usually be referred to without 'window.'
|-focus()  ->  causes the window to receive focus
|-isNaN(number numberToCheck)  ->  returns if the number is NaN (eg. Math.sqrt(-1)) usually be referred to without 'window.'
|-moveBy(int xOffset,int yOffset)  ->  moves the browser window by the specified amount
|-moveTo(int xPos,int yPos)  ->  moves the browser window to the specified coordinate
|-open(string url[,string targetName[,string options[,bool replaceHistoryEntry]]])  ->  opens the URL specified with the settings provided returns a reference to the window the targetName is used by <a target= ...> options is a string containing a comma separated list of option=value where value is an integer giving a size or yes or 1 to enable the option or no or 0 to disable it available options are: height=int height of window left=int distance between left side of window and left side of screen location=enable/disable menubar=enable/disable resizable=enable/disable scrollbars=enable/disable status=enable/disable toolbar=enable/disable top=int distance between top of window and top of screen width=int width of window Some browsers may offer more leave any out to resort to their defaults
|-parseInt(string textContainingAnInteger)  ->  returns the integer part of a string usually be referred to without 'window.'
|-parseFloat(string textContainingAFloat)  ->  returns the float part of a string usually be referred to without 'window.'
|-print()  ->  displays the print dialog box allowing the user to print the current document
|-prompt(string message,string defaultValue)  ->  displays a prompt allowing the user to input a variable value returns the user-inputted value as a string can only be used whilst the page loads
|-resizeBy(int xOffset,int yOffset)  ->  resizes the browser window by the specified amount
|-resizeTo(int xWidth,int yWidth)  ->  resizes the browser window to the specified amount
|-scrollBy(int xOffset,int yOffset)  ->  scrolls the document by the specified amount
|-scroll or scrollTo(int xPos,int yPos)  ->  scrolls the document to the specified coordinate
|-setInterval(string scriptToEvaluate,int timeInMilliseconds)  ->  repeatedly waits for the specified amount of time before evaluating the code specified returns an integer reference to the interval object
|-setTimeout(string scriptToEvaluate,int timeInMilliseconds)  ->  waits for the specified amount of time before evaluating the code specified returns an integer reference to the timeout object
`-unescape(string textToURLUnEncode)  ->  returns the string URL unencoded usually be referred to without 'window.'

Positioned elements

PositionedElement  ->  a div (or span) element that has been absolutely positioned using stylesheets referred to using any of document.IdOfElement document.all document.layers document.getElementById as above. Read-only
|-bgColor - non-style syntax  ->  refers to the default background colour of the element read-write  for cross-browser scripting, see also positionedElement.style.background positionedElement.style.backgroundColor
|-clip - separate contents syntax  ->  if available, this refers to the visible area of the element read-only  for cross-browser scripting, see also positionedElement.style.clip
| |-bottom  ->  the distance between the top edge of the element and the start of the bottom portion of the element that is not visible in pixels (integer) read-write  for cross-browser scripting, see also positionedElement.style.clip
| |-left  ->  the size of the left portion of the element that is not visible in pixels (integer) read-write  for cross-browser scripting, see also positionedElement.style.clip
| |-right  ->  the distance between the left edge of the element and the start of the right portion of the element that is not visible in pixels (integer) read-write  for cross-browser scripting, see also positionedElement.style.clip
| `-top  ->  the size of the top portion of the element that is not visible in pixels (integer) read-write  for cross-browser scripting, see also positionedElement.style.clip
|-document - separate contents syntax, children as with window.document  ->  refers to the contents of the element equivalent to a whole new document read-only if the contents are uneditable, like with Opera PositionedElement.document = window.document
|-id  ->  refers to the id of the element in Netscape 4, if the name attribute is set, the positionedElement.id will be the name attribute and the name attribute must be used instead when referring to the element. For this reason, it is best not to set the name attribute read-only
|-innerHTML - alternative contents syntax, no children  ->  refers to the contents of the element as part of the main document read-write  for cross-browser scripting, see also positionedElement.document.open, write, writeln and close window.frames[nameOfIframe].window.document
|-innerText - alternative contents syntax, no children  ->  refers to the text contained within the element as part of the main document best to use innerHTML instead read-write  for cross-browser scripting, see also positionedElement.document.open, write, writeln and close window.frames[nameOfIframe].window.document
|-left - non-style syntax  ->  if available, this is an integer specifying the left coordinate of the element read-write  for cross-browser scripting, see also positionedElement.style.left positionedElement.style.pixelLeft (not required)
|-name  ->  refers to the name of the element in Netscape 4, if the name attribute is set, the positionedElement.id will be the name attribute and the name attribute must be used instead when referring to the element. For this reason, it is best not to set the name attribute read-only
|-style - style syntax  ->  if available, this refers to the style of the element read-only
| |-background  ->  refers to the default background colour of the element browsers other than Opera may also give other information, eg. background images etc. read-write  for cross-browser scripting, see also positionedElement.bgColor positionedElement.style.backgroundColor
| |-backgroundColor - not Opera 5 (use background)  ->  refers to the default background colour of the element read-write  for cross-browser scripting, see also positionedElement.bgColor positionedElement.style.background
| |-clip - has no effect in Opera  ->  refers to the coordinates of the visible area of the element in string format: rect(topPos rightPos bottomPos leftPos) all values should be in pixels (integers) read-write  for cross-browser scripting, see also children of positionedElement.clip
| |-color  ->  refers to the default colour of the text in the element read-write  for cross-browser scripting, see also positionedElement.document.fgColor
| |-height - string style syntax  ->  refers to the height of the element in the format '100px' read-write  for cross-browser scripting, see also positionedElement.resizeTo positionedElement.pixelHeight
| |-left  ->  refers to the left coordinate of the element in the format '100px' read-write  for cross-browser scripting, see also positionedElement.left positionedElement.style.pixelLeft (not required)
| |-pixelHeight - Internet Explorer syntax  ->  refers to the height of the element in pixels as an integer read-write  for cross-browser scripting, see also positionedElement.resizeTo positionedElement.height
| |-pixelLeft  ->  refers to the left coordinate of the element in pixels as an integer read-write  for cross-browser scripting, see also positionedElement.left positionedElement.style.left
| |-pixelTop  ->  refers to the top coordinate of the element in pixels as an integer read-write  for cross-browser scripting, see also positionedElement.top positionedElement.style.top
| |-pixelWidth - Internet Explorer syntax  ->  refers to the width of the element in pixels as an integer read-write  for cross-browser scripting, see also positionedElement.resizeTo positionedElement.width
| |-top  ->  refers to the top coordinate of the element in the format '100px' read-write  for cross-browser scripting, see also positionedElement.top positionedElement.style.pixelTop (not required)
| |-visibility  ->  refers to the visibility of the element available values are 'visible' and 'hidden' read-write  for cross-browser scripting, see also positionedElement.visibility
| |-width - string style syntax  ->  refers to the width of the element in the format '100px' read-write  for cross-browser scripting, see also positionedElement.resizeTo positionedElement.pixelWidth
| `-zIndex  ->  refers to the z-index (stacking order) of the element must be a positive integer read-write  for cross-browser scripting, see also positionedElement.zIndex
|-top - non-style syntax  ->  if available, this is an integer specifying the top coordinate of the element read-write  for cross-browser scripting, see also positionedElement.style.top positionedElement.style.pixelTop (not required)
|-visibility - non-style syntax  ->  refers to the visibility of the element available values are 'show' and 'hide' read-write  for cross-browser scripting, see also positionedElement.style.visibility
|-zIndex - non-style syntax  ->  refers to the z-index (stacking order) of the element must be a positive integer read-write  for cross-browser scripting, see also positionedElement.style.zIndex
|-onclick - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user depresses then releases a mouse button over the positioned element positionedElement.onclick = functionName; read-write
|-ondblclick - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user depresses then releases a mouse button twice in quick succession over the positioned element positionedElement.ondblclick = functionName; it is important to note that browsers on the Mac operating system (as well as a few others) generally do not detect this event for that reason it is best to use this event only to prevent two clicks being counted once it is possible to emulate this event's response using a combination of onclick and window.setTimeout read-write
|-onkeydown - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user presses a key down while the positioned element (but not an input) has the focus positionedElement.onkeydown = functionName; read-write
|-onkeypress - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user presses and releases a key down while the positioned element (but not an input) has the focus positionedElement.onkeypress = functionName; read-write
|-onkeyup - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user releases a key while the positioned element (but not an input) has the focus positionedElement.onkeyup = functionName; read-write
|-onmousedown - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user depresses a mouse button over the positioned element positionedElement.onmousedown = functionName; read-write returning false from a right button mousedown will prevent the right click menu from appearing in most browsers some may need you to return false from an oncontextmenu event and some do not detect right clicks
|-onmousemove - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user moves the mouse while it is over the positioned element positionedElement.onmousemove = functionName; read-write
|-onmouseout - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user moves the mouse from over the positioned element to off the positioned element positionedElement.onmouseout = functionName; read-write
|-onmouseover - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user moves the mouse from off the positioned element to over the positioned element positionedElement.onmouseover = functionName; read-write
|-onmouseup - Netscape 4 will only use this if captureEvents is also used  ->  fires when the user releases a mouse button over the positioned element positionedElement.onmouseup = functionName; read-write 
|-captureEvents(Event.EventType)  ->  causes Netscape 4 compatible browsers to react to events see window.Event for what events can be captured
`-resizeTo(int width,int height) - non-style syntax  ->  resizes the layer by changing the values of clip.bottom and clip.right  for cross-browser scripting, see also positionedElement.style.width and positionedElement.style.height positionedElement.style.pixelWidth and positionedElement.style.pixelHeight

Event objects

window.event OR first argument passed to handler function  ->  holds records of mouse buttons or keys that triggered the event available if triggered by object.onEventName = handlerFunctionName; or <element onEventName=&quot;thisIsEquivalentToAHandlerFunction;&quot;>
|-altKey - Internet Explorer compatible  ->  boolean: says if the Alt key was pressed during the event note: some browsers do not provide this or the Netscape 4 compatible method of checking these keys read-only  for cross-browser scripting, see also eventObject.modifiers
|-button - proprietary DOM compatible  ->  if a left mouse button triggered the event, this will be 0 or 1 if a right mouse button triggered the event, this will be 2 some browsers do not detect right-clicks read-only  for cross-browser scripting, see also eventObject.which
|-clientX - DOM compatible  ->  if the mouse triggered the event, this holds the horizontal position of the mouse in Opera compatible browsers, this is relative to the whole page, in others it is relative to the displayed portion of the page Opera compatible browsers do not obey the standard and can be detected using ( ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) || ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) || window.navigator.vendor == 'KDE' ) read-only  for cross-browser scripting, see also eventObject.pageX
|-clientY - DOM compatible  ->  if the mouse triggered the event, this holds the vertical position of the mouse in Opera compatible browsers, this is relative to the whole page, in others it is relative to the displayed portion of the page Opera compatible browsers do not obey the standard and can be detected using ( ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) || ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) || window.navigator.vendor == 'KDE' ) read-only  for cross-browser scripting, see also eventObject.pageY
|-ctrlKey - Internet Explorer compatible  ->  boolean: says if the Ctrl key was pressed during the event note: some browsers do not provide this or the Netscape 4 compatible method of checking these keys read-only  for cross-browser scripting, see also eventObject.modifiers
|-keyCode - proprietary DOM compatible  ->  a number that represents the key pressed keypad codes may vary read-only  for cross-browser scripting, see also eventObject.which
|-modifiers - Netscape 4 compatible  ->  a number that represents the combination of special keys pressed during the event 1 = Alt, 2 = Ctrl, 4 = Shift, 8 = Command (MAC) Can be added together if combinations are pressed note: some browsers do not provide this or the Internet Explorer compatible method of checking these keys read-only  for cross-browser scripting, see also eventObject.altKey eventObject.ctrlKey eventObject.shiftKey
|-pageX - Netscape compatible  ->  if the mouse triggered the event, this holds the horizontal position of the mouse relative to the whole page read-only  for cross-browser scripting, see also eventObject.clientX
|-pageY - Netscape compatible  ->  if the mouse triggered the event, this holds the vertical position of the mouse relative to the whole page read-only  for cross-browser scripting, see also eventObject.clientY
|-screenX  ->  if the mouse triggered the event, this holds the horizontal position of the mouse relative to the screen read-only
|-screenY  ->  if the mouse triggered the event, this holds the vertical position of the mouse relative to the screen read-only
|-shiftKey - Internet Explorer compatible  ->  boolean: says if the Shift key was pressed during the event note: some browsers do not provide this or the Netscape 4 compatible method of checking these keys read-only  for cross-browser scripting, see also eventObject.modifiers
|-target - Netscape compatible  ->  refers to the object that triggered the event irrespective of capturing or bubbling works correctly only with mouseup and mousedown events read-only  for cross-browser scripting, see also eventObject.srcElement
| this  ->  the word 'this' when written as part of the handler function code refers to the object that triggered the event note, it is NOT a property of the function or the event object with capturing or bubbling, 'this' will refer to each element in turn read-only
|-type  ->  a string giving the type of event that was triggered this will be in lower case, without the 'on' eg. mouseover in KHTML browsers, this will be prefixed with 'khtml_' for key events read-only
|-srcElement - Internet Explorer compatible  ->  refers to the object that triggered the event irrespective of capturing or bubbling read-only  for cross-browser scripting, see also eventObject.target
`-which - Netscape compatible  ->  if a left mouse button triggered the event, this will be 1 if a right mouse button triggered the event, this will be 3 some browsers do not detect right-clicks if a key triggered the event, this will be the key code (keypad codes may vary) read-only  for cross-browser scripting, see also eventObject.keyCode eventObject.button

Intrinsic objects showing constructors

The constructors are all properties of the window object but they are almost always used without ‘window.’

Syntax:
var variableName = new intrinsicObjectConstructor(options);
eg.
var myArray = new Array(‘here’,’there’,’everywhere’);

Array([int length]) - in JavaScript < 1.2 - or  ->  
  Array([element 0[, element 1[, element ... n]]]) or
  [element 0, element 1, element ... n]
|-length  ->  the number of cells in a numerically indexed array
|-concat(elementToAppend[,elementToAppend[,elementToAppend etc.]])  ->  adds cells to the end of the array containing the specified values
|-join([string separatorToReplaceComma])  ->  returns a string representation of the array with the cell contents separated by the specified string (default ,)
|-reverse()  ->  reverses the order of the array
|-slice(int offsetFromStart[,int offsetFromEnd])  ->  returns an array with the cells taken from the specified portion of the array
|-sort([function sortFunction])  ->  sorts the array in order of the values of its cells unless sortFunction is specified sortFunction must accept two arguments if the function returns > 0, the second argument will be sorted higher than the first if the function returns < 0, the second argument will be sorted lower than the first if the function returns 0, the entries will remain as they are with respect to each other
`-toString() or valueOf()  ->  returns a string representation of the array

Boolean([bool value]) or true or false  ->  a true or false value
|-toString()  ->  returns the word true or false
`-valueOf()  ->  returns the boolean value

[note, in this next section, a UNIX timestamp (milli) is the number of
milliseconds since 00:00:00.000 01/01/1970]
Date() or Date(int UNIXTimestampMilli) or  ->  
  Date(year, month, date[, hours[, minutes[, seconds[,ms]]]])
|-getDate()  ->  returns the day of the month represented by the date object
|-getDay()  ->  returns the day of the week represented by the date object
|-getFullYear()  ->  returns the year represented by the date object in 4 digit format not supported by many browsers see getYear()
|-getHours()  ->  returns the hour represented by the date object in 24 hour format
|-getMilliseconds()  ->  returns the millisecond represented by the date object
|-getMinutes()  ->  returns the minute represented by the date object
|-getMonth()  ->  returns the month represented by the date object
|-getSeconds()  ->  returns the second represented by the date object
|-getTime()  ->  returns the UNIX timestamp (in milliseconds) represented by the date object
|-getTimezoneOffset()  ->  returns the number of hours the user's computer is away from GMT
|-getUTCDate()  ->  returns the day of the month represented by the date object converted to GMT
|-getUTCDay()  ->  returns the day of the week represented by the date object converted to GMT
|-getUTCFullYear()  ->  returns the year represented by the date object in 4 digit format converted to GMT
|-getUTCHours()  ->  returns the hour represented by the date object in 24 hour format converted to GMT
|-getUTCMilliseconds()  ->  returns the millisecond represented by the date object converted to GMT
|-getUTCMinutes()  ->  returns the minute represented by the date object converted to GMT
|-getUTCMonth()  ->  returns the month represented by the date object converted to GMT
|-getUTCSeconds()  ->  returns the second represented by the date object converted to GMT
|-getYear()  ->  returns the year represented by the date object this could be in a variety of formats depending on the browser as JavaScript does not support dates before 1970 or beyond 2038 anyway, the following algorithm solves all problems theYear = dateObject.getYear() % 100;      //0-38 or 70-99 theYear += ( theYear < 39 ) ? 2000 : 1900; //1970-2038 or theYear = ( dateObject.getYear() % 100 ) + ( ( ( dateObject.getYear() % 100 ) < 39 ) ? 2000 : 1900 );
|-setDate(int UNITXTimestampMilli)  ->  sets the day of the month represented by the date object
|-setFullYear(int yearIn4DigitFormat[,int month[,int dayOfMonth]])  ->  sets the year represented by the date object in 4 digit format
|-setHours(int hours[,int minutes[,int seconds[,int milliseconds]]])  ->  sets the hour represented by the date object in 24 hour format
|-setMilliseconds(int milliseconds)  ->  sets the millisecond represented by the date object
|-setMinutes(int minutes[,int seconds[,int milliseconds]])  ->  sets the minute represented by the date object
|-setMonth(int month[,int dayOfMonth])  ->  sets the month represented by the date object
|-setSeconds(int seconds[,int milliseconds])  ->  sets the second represented by the date object
|-setTime(int UNITXTimestampMilli)  ->  sets the UNIX timestamp (in milliseconds) represented by the date object
|-setUTCDate(int UNITXTimestampMilli)  ->  sets the day of the month represented by the date object converted to GMT
|-setUTCFullYear(int yearIn4DigitFormat[,int month[,int dayOfMonth]])  ->  sets the year represented by the date object in 4 digit format converted to GMT
|-setUTCHours(int hours[,int minutes[,int seconds[,int milliseconds]]])  ->  sets the hour represented by the date object in 24 hour format converted to GMT
|-setUTCMilliseconds(int milliseconds)  ->  sets the millisecond represented by the date object converted to GMT
|-setUTCMinutes(int minutes[,int seconds[,int milliseconds]])  ->  sets the minute represented by the date object converted to GMT
|-setUTCMonth(int month[,int dayOfMonth])  ->  sets the month represented by the date object converted to GMT
|-setUTCSeconds(int seconds[,int milliseconds])  ->  sets the second represented by the date object converted to GMT
|-setYear(int numberOfYearsSince1900)  ->  sets the difference between 1900 and the year represented by the date object
|-toUTCString or toGMTString()  ->  returns the date as a string, converted to GMT
|-toString or toLocaleString()  ->  returns the date as a string
|-valueOf()  ->  returns the UNIX timestamp (in milliseconds) represented by the date object
`-UTC()  ->  returns the UNIX timestamp (in milliseconds) represented by the date object, coverted to GMT

Function([string varName,[string varName2,[etc.,]]]string scriptToEvaluate) or  ->  a series of instructions that can be activated as and when necessary can return values
  function functionName(listOfVariables) { function code }  or
  functionName = function (listOfVariables) { function code }
|-caller  ->  refers to the function that called this function (or null if none) note, it is a property of the individual function and must be written as functionObject.caller read-write but unusable if written to
|-constructor  ->  returns a string representation of the function's contruct code
|-prototype  ->  if the function is used as an object constructor, functionObject.prototype.newPropertyName creates new properties for all objects of that class read-write but unusable if written to
| this  ->  'this' written as part of the function code refers to the current object if activated directly by an event, this will be the object that triggered the event if being used to construct an object, this will refer to the construct object (that is the instantaneous object being constructed, which is stored temporarily until it is returned) if neither of these are satisfied, this refers to window 'this' is not a property of anything read-only
|-arguments[]  ->  the arguments collection when written as part of the function code refers to the collection of variables passed to the function note, it is a property of the individual function but can be written as either functionObject.arguments or just arguments (unless arguments has been defined as a global variable) read-write but unusable if written to
|-toString()  ->  returns a string representation of the function
`-valueOf()  ->  returns the function

Image([int width,int height])  ->  creates an image that is not displayed but is stored in cache children as for window.document.nameOfImage the image will not be loaded until the src is set

Number(numberOrString value) or number in hex, octal or decimal  ->  a variable with a numerical value can be negative or positive or NaN or Infinity and can have E+ or E-
|-toString()  ->  returns the number as a string
`-valueOf()  ->  returns the number

Object() or { propertyName1: value1[, propertyName2: value2[, etc.]] }  ->  creates a variable that can have properties or child objects

Option([string text,string value[,bool selected]])  ->  creates an select input option that can be stored until it is inserted into a select input using: window.document.nameOfForm.nameOfSelect.options[int optionNum] = optionObject children as for window.document.nameOfForm.nameOfSelect.options[int optionNum]

RegExp(string pattern,string options) or /pattern/options  ->  a text pattern matching series of meta and normal characters some browsers fail to implement this correctly (eg. Opera 6- and iCab)
|-compile(string pattern,string options)  ->  redefines the regular expression and compiles it for faster use than normal only useful if using the same regular expression multiple times
|-exec(string stringToMatch)  ->  attempts to match the regular expression against the string returns an array of the details of the last match or null if none:  [   last substring that fully matched the regular expression,   last instance of first capture,   ...,   last instance of ninth capture ]  returned array has two other properties: index - the position within the string where the pattern began to match (read-only) input or $_ - the original string (read-only)
|-global  ->  boolean: says if the 'g' option was used for a global match read-only
|-ignoreCase  ->  boolean: says if the 'i' option was used to ignore case read-only
|-lastIndex  ->  the index where the last match occurred during exec or test (read) OR the index at which to start the next match (write)
|-source  ->  the text of the pattern read-only
`-test(string stringToMatch)  ->  attempts to match the regular expression against the string returns boolean if a match is found

String([stringOrObjectToBeRepresentedAsString]) or 'content' or "content"  ->  a variable consisting only of ascii characters
|-length  ->  the number of characters in the string read-write
|-anchor(string nameOfAnchor)  ->  surrounds the string with <a name=''nameOfAnchor''> tags
|-big()  ->  surrounds the string with <big> tags
|-blink()  ->  surrounds the string with <blink> tags
|-bold()  ->  surrounds the string with <b> tags
|-charAt(int index)  ->  returns the character at the specified index
|-charCodeAt(int index)  ->  returns the numerical ascii value of the character at the specified index read-only
|-concat(string stringToAppend[,string stringToAppend[,string stringToAppend etc.]])  ->  returns the strings appended to each other and the string object in order
|-fixed()  ->  surrounds the string with <tt> tags
|-fontcolor(string colorValue)  ->  surrounds the string with <font color=''colorValue''> tags
|-fontsize(int size)  ->  surrounds the string with <font size=''size''> tags
|-indexOf(string searchString[,int offset])  ->  returns the first position of the searchString within the string object returns -1 if none
|-italics()  ->  surrounds the string with <i> tags
|-lastIndexOf(string searchString[,int offset])  ->  returns the last position of the searchString within the string object returns -1 if none
|-link(string hrefToLinkTo)  ->  surrounds the string with <a href=''hrefToLinkTo''> tags
|-match(RegExp searchExpression)  ->  finds the first 9 matches of the regular expression within the string and stores them in the RegExp object
|-replace(RegExp searchExpression,string replacementText)  ->  replaces the first occurrence of the specified regular expression within the string with the replacement text
|-search(RegExp searchExpression)  ->  returns the first position of the regular expression within the string object returns -1 if none
|-slice(int offsetFromStart[,int offsetFromEnd])  ->  returns the substring starting at the specified index and ending at the specified offset from the end if the offset is not specified, the offset is taken as 0
|-small()  ->  surrounds the string with <small> tags
|-split(RegExp separator[,int maxArrayLength])  ->  splits a string on the occurrence of a specified substring results are returned as an array if a maximum length is specifed, the final cell will contain any amounts not split after that point
|-strike()  ->  surrounds the string with <s> tags
|-sub()  ->  surrounds the string with <sub> tags
|-substr(int startIndex[,int length])  ->  returns the substring starting at the specified index and the specified length long if no length is specified, the length is to the end of the string
|-substring(int startIndex,int endIndex)  ->  returns the substring starting at the specified index and ending at the specified index
|-sup()  ->  surrounds the string with <sup> tags
|-toLowerCase()  ->  returns the string in lower case
|-toUpperCase()  ->  returns the string in upper case
`-valueOf()  ->  returns the string

Original Tutorial