Front-End development--bom

Source: Internet
Author: User
0. BOM vs. DOM Bom:browser object model, which is the absolute core of using JavaScript in the web;
BOM: Provides objects that interact with the browser window, independent of content. The BOM provides a number of objects (Windows, location, navigator) that are used to access the functionality of the browser, regardless of any Web content; Dom:document Object Model,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. 1. Window Objects

Global scope: The Window object acts as a global object in ECMAScript, so all variables declared in the global scope and functions become properties and methods of the Window object.

var age =
Showage () {
    alert (this.age)
}//

access Variable
alert (window.age)
in the global scope Showage ()
//accessing functions in the global scope
window.showage ()

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.