Getting started with Dom animation effects basics

Source: Internet
Author: User

First, what is DOM?

Document Object Model Documents

When creating a Web page and loading it into a Web browser, if there is no document (DOC);

Dom creates a document object based on the Web page document you write

The objects in the Javascipt language are divided into three categories:

1. User-defined objects (User-defined object): objects created by programmers themselves

2. Built-in objects (native object): Built into JavaScript language objects, such as Array Math and date

3. Host object: A browser-provided object (Window object)

Window objects correspond to the browser window itself. The properties and methods of this object are generally referred to as the BOM (browser object model) BOM to provide programmers with window.open () and window.onload ();

Example: You see a variety of pop-up window drop-down menu when you are on the Internet, almost all have a BOM method responsible for creating and processing

Var array= "1, 2, 3, 4"

We now want to put the 7 number behind this array.

Want is "1, 2, 3, 4, 7"

Push () pushes in from behind

Example: var arr = "1, 2, 3, 4"

What I want is to put 7 in this array.

Arr.push (7)

Console.log (arr);

Instance:

Arr.unshift (10) put in front of the array

Console.log (arr)

Instance: removing from the back

Arr.pop ()

Console.log (arr)

Instance: removing from the front

var AA = "11, 12, 13"

var sum = aa. Concat (arr)

var zoom = Arr.concat (AA)

Console.log (sum);

Console.log (zoom);

Converts an array to a string join (the function joins the individual elements in the array into a string by making a delimiter)

Console.log (Arr.join ("-"));

Convert a string to an array

var txt = "AA-BB-CC"

Console.log (Txt.split ("-"))

JS is a few parts of the composition

Core (ECMAScript) DOM BOM

Ecmaascipt European computer maker organization

Dom methods and interfaces for handling Web page content

The method and interface of BOM and browser interaction

Dom Tree

Tag tag element node

Structure diagram The entire document is a document node

Each HTML tag is a node of an element

The text in the tag is the text node

The attribute in the tag is the attribute node

getElementById Accessing nodes by ID

Getelementbytagname () Tag Access node

Getelementbyclassname () class name

Getting started with Dom animation effects basics

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.