JavaScript Document object and Window object Detailed _ Basics
Source: Internet
Author: User
[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.
[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
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.