What is the JavaScript BOM and the difference between BOM and Dom _javascript tips

Source: Internet
Author: User
Tags object model

What is BOM

BOM is the abbreviation of browser object model, referred to as browser
The BOM provides objects that interact with the browser window, independent of content
Because the BOM is mainly used to manage the communication between Windows and Windows, its core object is window
A BOM consists of a series of related objects, and each object provides a number of methods and attributes
BOM lacks the standard, the JavaScript grammar Standardization organization is the Ecma,dom standardization Organization is the International Consortium
BOM was originally part of Netscape's browser standard

What you will learn in the BOM section

In the BOM tutorial, students will learn about objects that interact with the browser window, such as window objects that can be moved, resized by browsers, location objects and history objects that can be used for navigation, access to browsers, The Navigator and screen object of the operating system and the user's on-screen information, you can use document as a portal to access HTML documents, manage the frames objects of the framework, etc.

BOM Structure Chart

The Window object is the top (core) object of the BOM, and all objects are extended through it, or they can be called child objects of the window

Because window is a top-level object, you can call its child objects without displaying a specified window object, such as the following two lines of code:

Example

document.write ("www.dreamdu.com");
Window.document.write (www.dreamdu.com);

ja What is the difference between BOM and Dom in Vascript?

This is the two different concepts in the browser runtime.

BOM Explorer Object model

Provides objects that interact with the browser window, independent of content. Describes the interaction with the browser methods and interfaces, you can access and operation of the browser window, such as pop-up new windows, change the text in the status bar, support for cookies, IE also expanded the BOM, joined the ActiveXObject class, Can instantiate ActiveX objects through JS script, etc.)

DOM Document Object Model

The DOM is a tree-based API for XML. Describes the methods and interfaces for dealing with Web content, which is the api,dom of HTML and XML to plan the entire page into a document composed of node hierarchies.

The DOM itself is a language-independent API and is not bound to java,javascript or other languages.

Dom for a particular language

Dom for XHTML and HTML. This DOM defines a htmldocument and htmlelement as the basis for this implementation.

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.