Elementary JavaScript tutorial (6) _ Javascript tutorial

Source: Internet
Author: User
JavaScript: elementary JavaScript tutorial (6). The Javascript tutorial uses the internal Object System of the browser to interact with HTML documents. It is used to organize and package related elements for program designers, so as to reduce the work of programmers and improve the ability to design web pages.

I. browser object hierarchy and its main functions
In addition to the document object mentioned above, the Navigator browser also provides Window objects, historical and Location objects.
Browser object (Navigator)
Provide information about browsers
Window object (Windows)
The Window object is at the top of the object hierarchy. It provides methods and properties for processing the Navigator Window.
Location)
The Location object provides methods and attributes to work with the currently opened URL. It is a static object.
Historical object (History)
The History Object provides information related to the History list.
Document Object)
A document object contains objects that work with the document elements. It encapsulates these elements for programmers to use.
With these objects, programmers can control and process the events in the WWW browser environment. JavaScript provides a wealth of internal methods and attributes, which reduces the work of programmers and improves programming efficiency. This is the fundamental difference between object-based and object-oriented. In these object systems, document objects are very important. They are located at the lowest layer, but play a key role in implementing Web page information interaction. Therefore, it is the core part of the object system.
 
Ii. Functions and functions of document objects
In the Navigator browser, document objects are the core and most important. See Table 6-1.
Links Anchor Form Method Prop
Link object Anchor object Form object Method Object

Table 6-1 document Object

As can be seen from table 6-1, the main function of the document object is to package these basic elements (such as links and anchor) for programming. From another perspective, the document Object is composed of attributes and methods.
 
1. Three main objects in document
In the document, there are three most important objects: links, anchor, and form:
(1) anchor object:
Anchor objects refer to objects generated when they exist in the HTML source code. It contains all the anchors information in the document.
(2) link the links object
A link object uses a tagged element that connects to a hypertext or hypermedia as a specific URL.

[1] [2] [3] [4] Next page

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.