JavaScript objects and Array Reference encyclopedia

Source: Internet
Author: User
Tags ftp hash gopher natural logarithm numeric value square root version time in milliseconds
Javascript| Reference | objects | arrays

JavaScript objects and Array Reference encyclopedia
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
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)
Reset button in the Reset form (1NPUT type= "reset" >) (the property itself is also an object)
Select box (<SELECT>) in the Select form (the property itself is also an object)
Submit button in submit form (<input type= "Submit" >) (the property itself is also an object)
Target the name of the window that displays the response information after the form is submitted
The text element in the text form (<input type= "Text" >) (the property itself is also an object)
The text area element (<TEXTAREA>) in the Textarta form (the property itself is also an object)
Method
Submit Submission Form (same as action using submit button) event handler
OnSubmit

b.10 Forms Array
The array is an attribute of the Document object, which enumerates an array of the forms within the documents.
Property
Number of forms within length document

B.11 Frame Object
It is a property of the Window object, a frame within the windows. With the exception of individual exceptions, the frame object works the same as the Window object.
Property
The frames array enumerates an array of the various child frames within the frame (the property itself is also-an object)
Length The number of frames within the frame
The name of the name frame (the name attribute in the <FRAME> tag)
Parent contains synonyms for this frame's parents window
Self synonyms for the current frame
Synonyms for window's current frame
Method
Cleartimeout () Work to terminate the SetTimeout method
SetTimeout () waits for the specified number of milliseconds, and then runs the instruction

b.12 Frames Array
It is both a Window object and a property of a Frame object, enumerating the frames within the window or Frame object.
Property
Number of frames within the length window or frame object

B.13 Hidden Object
Paste is a property of the form object, a hidden element within the window (<input type= "HIDDEN" >).
Property
The name within the name tag (name attribute)
Value= Characteristics in value tags

B.14 History Object
It is a property of the Window object, a historical list of the Windows.
Property
Number of items in the length history list
Method
Back loads the previous document in the history list
Forward load the next document in the history list
Go loads a specified document in the history list, specified by the location of the document in the list

B.15 Image Object
It is an attribute of the document object and is an image embedded within a document using the (1MG) tag This is the new object introduced by Netscape Navigator 3.0 Beta 3.
Property
Border characteristics of border markers
Complete indicates whether the browser has fully loaded a Boolean value of the image
Height height characteristic
Hspace hspace Characteristics
LOWSRC LOWSRC Characteristics
src src characteristics
Vspace vspace Characteristics
Width and width characteristic
Event handlers
Onload Image Loading
Onerror Load Error
Onabort canceled.

b.16 Images Array
It is a property of the Document object, a list of all the images in the documentation.
Property
Number of images in length document

b.17 Link
It is a property of the Document object, and a <a href=> tag within it.
Property
A string that begins with a hash number (#) that specifies an anchor point within the URL
Host name portion of the URL that includes the colon and port number
Hostname is the same as the host property except that the colon and port number are not included
href complete URL
The directory path portion of the pathname URL
Port URL: Ports section
Protocol URL type (http:, ftp:, Gopher: etc.)
Search a part of a URL that starts with a question mark that specifies the searching information
Target the window used to display the contents of the referenced document when the user clicks a link (target attribute)
Event handlers
Onclick Click
Onmouseover the mouse over the object

B.18 Links Array
It is a property of the Document object, a list of all the links in the documentation.
Property
Number of links within length document

b.19 Location Object
It is a property of the Document object, and the full URL of the documentation, do not confuse it with the Window.location property, which can be used to load a new document. And the Window.location property itself is not an object, and window.location can be modified by script, while Document.location cannot.
Property
A string that starts with a hash number (#) that specifies an anchor point in the URL
host name portion of the URL that contains the colon and port number
hostname is the same as the host property except that the colon and the port number are not included in the
H Ref full URL
Pathname URL of the directory path portion
Port URL: The type of
Protocol URL (http:, ftp:, gopher: Et cetera)
Search with a question mark (?) A portion of the beginning URL that specifies the window in which to display the contents of the referenced document when
Target user clicks the link (target attribute)

b.20 Math Object
This object is not a property of other objects, but rather a built-in object that contains a number of mathematical constants and functions.
Property
E Euler constant, the base of the natural logarithm (approximately equal to 2.718)
LN2 2 's natural logarithm (approximately equal to 0.693)
LN10 10 's natural logarithm (approximately equal to 2.302)
log2e the logarithm of 2-based E (approximately 1.442)
LOG10E of 10-based e (approximately equal to o.434)
Pi∏ value (approximately equal to 3.14159)
Sqrt1_2 0.5 square root (that is, L divided by 2 square root, approximately equal to o.707)
SQRT2 2 square root (approximately equal to 1.4  
Method
Abs () returns the absolute value of a number (that is, the distance between the number and O). For example, the absolute value of 2 and 12 is 2)
ACOs () returns the inverse cosine of a number (in radians)
ASIN () returns the inverse chord value (in radians) of a number ()
Atan () returns the inverse tangent value (in radians) of a number
Ceil () returns the smallest integer that is equal to or greater than the number (Ceil (-22.22) returns -22;CEIL22,22) returns 23;ceil (22)
cos () Returns the cosine of a number (in radians)
exp () return en
Floor () Contrary to ceil (floor (a 22.22) returns a 23;floor (22.22) back to Floor (22) return)
10g () Returns the natural logarithm of a number (in E)
Max () returns a larger value between two numbers
min () returns the smaller value of the two number of questions
Pow () returns the N-second side of M (where the M is bottom, n is exponential)
random () returns a pseudo random number between 0 and 1 (the method Only valid in the UNIX version of Netscape
Navigator
Round () returns a number rounded integer
sin () returns a number (in radians) of the sine value
sqrt () returns the square root of a number of
Tan ( Returns the tangent value of a number

B.2L Navigator Object
This object is not a property of another object, but rather a built-in object that contains information about the browser that loaded the document.
Property
Code name of the appCodeName browser (for example, Mozilla)
The name of the AppName browser
Version number of AppVersion browser
useragent user and Agent header text sent to the server by the client
Method
javaenabled JavaScript does not currently have this method, but will soon add that it will see if the browser is compatible with JavaScript, and if so, continue to see if JavaScript is supported.

b.22 Options Array
The array is a property of the Select object, a list of all options (<OPTION>) in the selection box.
Property
Default options in the list of defaultselected options
Index position of an option in the Index options list
Number of options in the length option list (<OPTIONS>)
The name of the list of name options (name attribute)
Selected a Boolean type value that indicates whether an option <OPTION> is selected in the list of options
Index of <OPTION> selected in the list of SelectedIndex options (location)
Text after <OPTION> tag in the text options list
value= attribute in list of value options

B.23 Password Object
It is a property of the Document object, a <input type= "PASSWORD" > tag.
Property
Default value of DefaultValue password object (value= attribute)
Name (name= attribute) of the name object
Value the current value of the field is initially the same as the value= attribute (defauttvalue), but if the script modifies the value in that field, the value changes
Method
Focus moves the focal point away from the field
Blur move focus to this field
Select Choose Input Area

B.24 Radio Object
It is a property of a Form object, a set of radio buttons (option buttons) (<input type= "RADIO" >) in the Body of the window.
Property
Checked the status of a check box or option button (radio button)
Defaultchecked the default state of a check box or option button (radio button)
Length The number of buttons in a set of radio buttons
Name (name= attribute) of the name object
Value Value= Property
Method
Click Simulate mouse button
Event handlers
OnClick Click

b.25 Reset Object
It is a property of the form object, the Reset button (<input type= "reset" >).
Property
Name (name= attribute) of the name object
Value Value= Property
Method
Click Simulate mouse button
Event handlers
OnClick Click

b.26 Select Object
It is a property of the Form object, the selection box (<SELECT>). The number of options in the
Properties
Length Options list (<OPTIONS>)
Name attribute
List of options in the option list
Selectedlndex option list is selected The <OPTION> index (location)
text in the list of options
The Value= attribute
Method
Blur the list of value options to remove focus from the list of options
focused The focus moves to the
event handler
Onblur in the Options list event
onchange change
onfocus Focus event

b.27 string Object
It is not a property of another object, but rather a built-in object, that is, a string of character string input scripts must be enclosed in quotation marks. The number of characters in the
Property
Length string
Method
anchor () is used to convert the string into an HTML anchor tag (<a name=>)
Big () to change the text in the string into a large font (<big& gt;)
Blink () turns text in a string into a blinking font (<BLINK>)
Bold () turns the text in the string into a black font (<B>)
CharAt () looks for one character at the specified position in the string
F Ixed () turns the text in the string into a fixed spacing font (<TT>)
FontColor () changes the color of the text in the string (<font color=>)
FontSize () turns the text in the string to the specified size ( <FONTSIZE=>)
IndexOf () is used to search for a special character in the string and return the index position of the character
italics () to turn the text in the string into a italic font (<I>)
Lastlndexof () is similar to indexof, but searches backwards for the last occurrence of the character
Link () to convert the string into an HTML link tag (<a href=>)
Small () to make the text in a string small (<SMALL>
Strike () turns the text in the string into a subscript font (<STRIKE>)
Sub () to turn the text in the string into subscript (sub>)
substring ()  Returns a portion of a string between a specified position in a string
sup () turns the text in the string into superscript (superscript) font (<SUP>)
toLowerCase () to make the text in the string lowercase
toUpperCase () turns the text in the string to uppercase

b.28 Submit Object
It is a property of the Form object, a Submit button (<input type= "Submit" >) in the forms.
Property
Name (name= attribute) of the name object
Value Value= Property
Method
Click Simulate mouse button
Event handlers
Onclick Click

B.29 text Object
It is a property of a Form object, a text field in the Universe (<input type= "text" >).
Property
DefaultValue text object's default value (Value= attribute)
Name of the object (Name= attribute)
Value The field has the current value, initially the same as the value= attribute (defaultvalue) But if the script modifies a value in that field, the value changes
Method
Blur move focus away from the text box
Focus moves to the text box
Select Choose Input Area
Event handlers
Onblur Lose Focus Event
Onchange changes
Onfocus Spotlight Event
Onselect Selection Event

b.30 TextArea Object
It is a property of the Form object, a text area (<TEXTAREA>) in the universe.
Property
Default value of DefaultValue textarea object (value= attribute)
Name of the object (Name= attribute)
Value the current value of the field is initially the same as the value= attribute (defaultvalue), but the value will change if the script modifies the value in that field.
Method
Blur shift the focus away from the text area
Focus moves to the text area
Select selects Input area event handlers
Event handlers
Onblur Lose Focus Event
Onchange changes
Onfocus Spotlight Event
Onselect Selection Event

b.31 Window Object
It is a top-level object, not another object's property, the browser's window.
Property
Defaultstatus The default status bar message
Document that is currently displayed (the property itself is also an object)
A frame in the frame window ((frame>) (the property itself is also an object)
Frames array enumerates the arrays of frame objects for the window, listed in the order in which they appear in the document (the property itself is also an object)
The history list of the History window (the property itself is also an object)
Number of frames in length window
The full (absolute) URL of the document displayed in the Location window (the property itself is also an object) do not confuse it with a document.location, which is the URL of the currently displayed document. The user can change the window.location (replace the current document with another document), but cannot change the document.location (because this is where the document is currently displayed)
When the name window is open, give the name of the window
Opener represents the window where the script for the current window is opened with window.open (this is a new attribute introduced by Netscape Navigator 3.0beta 3)
Parent contains a synonym for the window for the current frame. A property of the frame and window objects
Self synonyms for the current window or frame
The message in the Status State bar
Top contains synonyms for the topmost browser window for the current frame
window or a synonym for the frame, same as self
Method
Alert () Opens an alert message box
Cleartimeout () Work to terminate the SetTimeout method
Close () Closes the window
Confirm () Opens a Confirm message box, the user can select OK or cancel, if the user clicks OK, the method returns True, click Cancel to return False
Blur () move focus away from the specified window (this is the new method introduced by Netscape Navigator 3.0 Beta 3)
Focus () Bring the specified window to the foreground (another new method)
Open () Opens a new window
Prompt () Opens a prompt dialog box that allows users to type text into the box and return typed text to the script
SetTimeout () waits a specified number of milliseconds, and then runs the instruction event handler
Event handlers
Onload () page loads when triggered
Onunload () trigger when page closes



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.