Table of Contents
DOM events (Document Object Model events)
BOM events (Browser Object Model events)
Home Common Problem What are DOM events and BOM events?

What are DOM events and BOM events?

Nov 13, 2023 am 10:47 AM
DOM event bom event

dom "Browser Object Model" event and bom "Document Object Model" event are respectively: 1. 4 types of BOM events such as "load", "unload", "resize" and "scroll"; 2. There are 5 DOM events including "click", "mouseover" and "mouseout", "change", "submit", "keydown" and "keyup".

What are DOM events and BOM events?

# Operating system for this tutorial: Windows 10 system, Dell G3 computer.

In web development, DOM events and BOM (Browser Object Model) events are two different concepts. Each of them represents a different event type.

DOM events (Document Object Model events)

DOM events are usually related to interaction with elements in web pages, including but not limited to:

  1. click: when the user clicks Event triggered when an element is clicked.
  2. mouseover and mouseout: Events triggered when the mouse moves over or out of an element.
  3. change: Event triggered when the value of a form element changes, such as input box content changes, drop-down list selection changes, etc.
  4. submit: Event triggered when the form is submitted.
  5. keydown and keyup: events triggered when the user presses or releases a keyboard key.

BOM events (Browser Object Model events)

BOM events are related to browser windows and documents, including:

  1. load: When the page is completely Events triggered after loading can be used to perform initialization operations.
  2. unload: Event triggered when the page is about to be unloaded, which can be used to perform cleanup operations.
  3. resize: Event triggered when the browser window size changes.
  4. scroll: Event triggered when the user scrolls the page.

In addition to the events listed above, there are many other DOM and BOM events available to developers. These events can be monitored through JavaScript and processed accordingly, thereby achieving rich interactive effects and user experience.

The above is the detailed content of What are DOM events and BOM events?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1267
29
C# Tutorial
1239
24