JavaScript object and array reference Daquan

xiaoxiao2021-03-06  104

This article lists various JavaScript objects and arrays, including short descriptions of each of the above objects or arrays, and related attribute methods, and event handlers, but also indicate the parent user of the object or array. It is also possible to refer to the Object Hierarchy page in Online Companion (

http://www.netscapepress.com/support/javascript/10-9.htm) so as to understand how these objects are related to each other.

By the way, remember, here all the objects of the child object as another object see the property of this object, see Chapter 10, in this decomposition.

B.1 Anchor object

The HTML point created by Mark can be used as a link as a target if an anchor includes href = characteristics, it is also a link object.

Anchor object is an attribute of the Document object, which does not have an attribute method or an event handler.

B.2 Anchors array

Anchors array is an attribute of the Document object. It is a list of all Anchor objects in the document. If Anchor is also a link (link), it will appear at the same ANCHORS and LINKS arrays.

Attributes

Number of anchor points in the Length document

B.3 Array object

The Array object is a new object introduced in Netscape Navlgator 3.0 Beta 3, which cannot be used in Netscape 2.0 to use it is a built-in object, not the properties of other objects.

Attributes

LENGTH array value

B.4 Button object

It is an attribute of the Form object, uses

Attributes

Name = characteristics in Name HTML tag

Value = Features in Value HTML tag

method

Click analog mouse click a button

Event handler

Onclick

B.5 Checkbox object

It is an attribute of the Form object, creates it using the tag.

Attributes

Checked check box Select Status

DefaultChecked tag checked = features

Name = characteristics

Value tag value = characteristic

method

Click Analog Mouse Click the button

Event handler

Onclick

B.6 Date object

It is a built-in object - instead of other objects, allowing users to perform various date and time of use.

method

Getdate () View Date objects and return the date

Getday () returns the day of the week

GetHours () Returns the number of hours

Getminutes () Returns the number of minutes

GetMonth () returns the month value

GetSeconds () Returns the number of seconds

getTime () Returns the full time

GetTimeZoneOffset () Returns the time zone deviation value (Greenwich average time and time zone settings in the time zone setting of the run script)

GetYear () returns the year

PARSE () Returns in the Date string Since the number of milliseconds since January 1, 1970 (Date object stored in the form of milliseconds from the date and time), but note that the method cannot Run correctly

SetDate () changes the date of the Date object

SetHours () change the number of hours

Setminutes () change the number of minutes

SetMonth () change the month

SetSeconds () change the number of seconds

SetTime () changes the complete time

SetYear () change the year

TogMTString () transforms the date (a value) of the DATE object into a GMT time string, returns the following values: Weds, 15 June L997 14:02:02 GMT (precise format depends on the operating system running on your computer Change)

TOLOCALESTRING () converts the date (a value) of the DATE object into a string, using the specific date format used on the computer

UTC () uses Date UTC (year, month, day, hour, minute, second) to the number of milliseconds since 00:00:00 from January 1, 1970 (where the minute, second is optional) Form Return Date B.7 Document Object

This object is an attribute of Window and Frames objects, which is a document displayed within the window or frame.

Attributes

AlinkColor activity link color (Alink)

Anchor an HTMI anchor, use tag (this property itself is also an object)

Anchors array lists the arrays of the document anchor object () (this property itself is also an object)

Background color of BGColor documents (BGColor)

Cookies are stored in a cookie.txt file, which is an attribute of the document object

FGColor document text color (Text features in tag)

A form (

) in the Form document (this property itself is also an object)

Forms Anay Lists an array of form objects in order that appears in the document (this property itself is also an object)

LastModified document last modified date

The link of the link of the LinkColor document, that is, the LINK feature in the tag (link to the document that the user does not observe)

One tag in the LINK document (this property itself is also an object)

A array of link objects in the Links Array document, in order of the order in which they appear in the document (this property itself is also an object)

Location The URL of the document is currently displayed. Users cannot change Document.Location (because this is the location of the current display). However, you can change window.location (replacing the current document with other documents) Window.Location itself is also an object, and Document.Location is not an object.

ReferRer contains the URL of the link, the user clicks the link to the current document

Title Document Title ((Title>)

VLINKCOLOR points to the link text color of the document has been observed, that is, tag of VLINK features

method

CLEAR clears the content of the specified document

Close Close Documentation

Open opens the document stream

Write writes text into documents

WriteLn writes text into documents and ends

B.8 Elements array

It is an attribute of the Form object, enumerating an array of each element in the form.

Attributes

A number of elements in the 1ENGTH form

B.9 FORM object

It is an attribute of the Document object, a form within the document.

Attributes

Action contains a string of target URL submitted for a form

One button in the Button form is created using the

Checkbox check box, create (this property itself is also an object) using the

Elements Array A array, which lists each form element in order that appears in the form (this property itself is also an object)

MIME encoding of an Encoding Form

A hidden element in the Hidden form (). A property of the form object (this property itself is also an object)

Number of elements in the Length form

Method Enter the form of data to the server to the server, namely (form) Method characteristics

Radio is set in the radio button in the form () (This property itself is also an object)

Select box in the SELECT form () (This property itself is also an object)

After the Target submits the form, the text element in the name of the window of the response information () (this property itself is also an object)

The text area element in the Textarta form (