


BOM
1. BOM is the abbreviation of Browser Object Model, which is the browser object model.
2. There is no relevant standard for BOM.
3. The most fundamental object of BOM is window.
As can be seen from 1: BOM and browser are closely related. Many things in the browser can be controlled through JavaScript, such as opening a new window, opening a new tab (tab), closing the page, setting the webpage as the homepage, or adding it to favorites, etc... The objects involved are BOM.
As can be seen from 2: Since there is no standard, different browsers may require different implementation methods to implement the same function. For the functions mentioned above, different browsers may require different JavaScript codes to implement the functions.
For example, adding a favorite function:
IE browser: window.external.AddFavorite(url,title);
FireFox browser: window.sidebar.addPanel (title, url, "");
So when writing this piece of JavaScript code, you must consider browser compatibility.
Although there is no set standard for BOM, the JavaScript codes for common functions of various browsers are still similar. There are actually default standards for common functions. So don’t worry too much about browser compatibility. Not every browser has its own BOM, and you don’t need to learn a set of BOM for each browser. It’s just that some browsers will have new functions that will be reflected in the BOM. .
DOM
1. DOM is the abbreviation of Document Object Model, which is the document object model.
2. DOM is a W3C standard.
3. The most fundamental object of DOM is document (actually window.document).
As can be seen from 1: DOM is related to documents. The documents here refer to web pages, which are HTML documents. The web page is sent by the server to the client browser. No matter what browser is used, the received HTML is the same, so the DOM has nothing to do with the browser. It focuses on the content of the web page itself. Since it has little to do with the browser, the standard can be easily determined.
Now that there are standards, everyone must abide by the standards. Browsers that do not abide by the standards will be spanked.
So what does JavaScript’s DOM do?
We know that HTML is composed of tags, tags within tags. JavaScript can get through the DOM what tags there are, what are the attributes in the tags, what is the content, etc...
As can be seen from the window.document in 3, the most fundamental object of the DOM is the window of the BOM A child object of the object.
The above picture illustrates the relationship between the two very well: the relationship between the two is that BOM contains DOM.

HTMLisaspecifictypeofcodefocusedonstructuringwebcontent,while"code"broadlyincludeslanguageslikeJavaScriptandPythonforfunctionality.1)HTMLdefineswebpagestructureusingtags.2)"Code"encompassesawiderrangeoflanguagesforlogicandinteract

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

How to design the dotted line segmentation effect in the menu? When designing menus, it is usually not difficult to align left and right between the dish name and price, but how about the dotted line or point in the middle...

HTML Element Analysis in Web Code Editor Many online code editors allow users to enter HTML, CSS, and JavaScript code. Recently, someone proposed...

About how to avoid code compression when building static pages using react-app-rewired Many developers want to deliver to...


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 English version
Recommended: Win version, supports code prompts!

SublimeText3 Mac version
God-level code editing software (SublimeText3)

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software