JavaScript objects and Array Reference encyclopedia

Source: Internet
Author: User
Tags arrays time in milliseconds

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 The Super Text Object Hierarchy page (http://www.netscapepress.com/support/javascript/10-9.htm) in companion to see how these objects relate to one another.

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

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.