JavaScript objects and Array Reference encyclopedia

Source: Internet
Author: User
Tags date format array arrays object numeric value string time in milliseconds
Javascript| Reference | objects | Arrays This article enumerates a variety of JavaScript objects and arrays, along with a brief description of the work done on each of these objects or arrays, and their associated property methods, and event handlers. Also note that the object or the parent of the array user may also need to refer to the Hypertext Object Hierarchy page in the online companion ( http://www.netscapepress.com/support/javascript/10-9.htmTo see how these objects are related to each other.

By the way, remember, this is where you see all the objects that are children of another object as properties of the object. Refer to the annotations in chapter tenth that are related to this.

B.1 Anchor Object

HTML strokes created using the <a name=> tag can be targeted by a link if the anchor includes the href= attribute, it is also a linked object.
The Anchor object is a property of the document object that itself does not have a property method or an event handler.

B.2 Anchors Array

A anchors array is a property of the document object and is a list of all the anchor objects within the documentation if anchor is also a link (link), it appears in both the anchors and links arrays.
Property
Number of anchor points in length document

B.3 Array Object

The array object is a new object introduced by Netscape Navlgator 3.0 Beta 3, so it cannot be used in Netscape 2.0 as a built-in object, not as a property of other objects.

Property

Number of values in length array

B.4 Button Object

It is a property of the form object and is created using the <input type= "button" > tag.

Property

Name= attribute in the name HTML tag
value= attribute in value HTML markup
Method
Click to simulate mouse clicks a button
Event handlers
OnClick

B.5 CheckBox Object
It is a property of the form object and is created using the <input type= "CHECKBOX" > tag.

Property

Select state of checked check box
checked= Characteristics of defaultchecked Markers
The name= attribute of the name tag
Value= property of Value tag
Method
Click Simulate mouse button
Event handlers
OnClick

B.6 Date Object

It is a built-in object-not a property of other objects, allowing the user to perform various uses of the date and time of the process.

Method

GetDate () View date objects and return dates
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 (the number of hours between Greenwich Mean time and the time zone setting of the computer where the script is run)
GetYear () return year
Parse () returns the number of milliseconds since January 1, 1970 00:00:00 in the date string (the Date object stores dates and times from that time in milliseconds) but note that the method is currently not running correctly
Setdate () Changing the date of a Date object
Sethours () Change the number of hours
Setminutes () Change the number of minutes
Setmonth () Change month
Setseconds () Change the number of seconds
SetTime () Change the full time
Setyear () Change year
toGMTString () Turns the Date object (a value) into a GMT time string, returning a value similar to the following: weds,15 June l997 14:02:02 GMT (the exact format depends on the operating system running on the computer)
toLocaleString () Turns the Date object's dates (a numeric value) into a string, using a specific date format that is configured on the computer that is used
UTC () uses date UTC (year, month, day, hour, minute, and second) to return the date as the number of milliseconds since January 1, 1970, when, minutes, and seconds are optional)

B.7 Document Object

This object is a property of the window and frames objects, and is a document that is displayed in a Windows or frame.

Property

Alinkcolor Active link color (ALINK)
Anchor a HTMI anchor point, created using the <a name=> tag (the property itself is also an object)
The anchors array lists the arrays of document anchor objects (<a name=>) (the property itself is also an object)
BgColor the background color of the document (bgcolor)
A cookie is a piece of information stored in a cookie.txt file, which is a property of the Document object
Text color of Fgcolor document (text attribute in <BODY> tag)
A form (<FORM>) in the form document (the property itself is also an object)
Forms Anay lists an array of form objects (the property itself is an object) in the order in which they appear in the document
LastModified the last modified date of the document
The color of the link in the LinkColor document, that is, the link attribute in the <BODY> tag (linked to a document that the user has not observed)
A <a href=> tag in the link document (the property itself is also an object)

An array of link objects in the Links array document, arranged in the order in which they appear in the document (the property itself is an object)
Location The URL of the currently displayed document. The user cannot change the document.location (because this is where the document is currently displayed). However, you can change window.location (replacing the current document with other documents) window.location itself is an object, and Document.location is not an object
Referrer contains the URL of the linked document that the user clicks to reach the current document
Title of document ((title>)
Vlinkcolor link text color that points to a document that the user has observed, that is, the vlink characteristics of the <BODY> tag

Method

Clear clears the contents of the specified document
Close closes the document flow
Open Document Flow
Write writes text to a document
Writeln writes text to the document and ends with a newline character.

B.8 Elements Array

It is a property of a Form object that enumerates an array of elements within the form.

Property

Number of elements in a 1ength window
B.9 Form Object
It is a property of the document object and is a form within it.

Property

The action contains a string of the target URL submitted for a form
A button in the button window that is created using the <input type= "button" > tag (the property itself is also an object)
CheckBox checkbox, using the <input type= "checkbox" > tag to create (the property itself is also an object)
An array of elements array that enumerates the form elements in the order in which they appear in the window (the property itself is also an object)
MIME encoding for encoding forms
A hidden element in the hidden form (<input type= "hidden" >). A property of a Form object (the property itself is also an object)
Number of elements in the length form
method to enter the way data on a form is transferred to the server, that is, the methods attribute in the (form) tag
Radio the radio button (<input type= "Radio" >) set in the form (the property itself is also an object)




Related Article

Alibaba Cloud 10 Year Anniversary

With You, We are Shaping a Digital World, 2009-2019

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.