JavaScript objects and array Reference Encyclopedia 1

Source: Internet
Author: User
Tags date format array arrays numeric value reference 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 its associated property methods, as well as event handlers, which also indicate that the parent object of the object or array may also need to refer to the online Companion the Super Text object Hierarchy page (http://www.netscapepress.com/support/javascript/10-9.htm), To 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)



Related Article

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.