File extension: .js
Let's take a brief look at what DOM is.
The DOM (stands for Document Object Model) is a convention, a platform- and language- neutral programming API for representing and interacting with objects in documents. DOM requires a document (such as a webpage) to be implemented as a tree of nodes (objects) that have certain attributes, which can be changed through the following manipulations:
changing the relation between nodes;
Below is a sample script, which outputs the so-called modal window with the well-known “Hello, World!” text in a browser:
In practice, it can be used to apply different animation effects to objects, such as dissolution, movement, zooming in and out, etc.
It is also widely used for implementing photo galleries or, for example, sliders/rotators of content whose purpose is to visualize the alternation of objects (say, images) within a limited space area.