Javascript learning journey (1)

Source: Internet
Author: User

Chapter 1 Brief History of JavaScript. There is nothing to remember. I briefly introduced the origin of js and conflicts between browsers.

Chapter 4 JavaScript syntax. It is worth noting that:

(1) strings are placed in single or double quotation marks. Double quotation marks are recommended. (This is a good habit of programming)

For example, var mood = "happy ";

(2) escape characters (escaping) with backslash \

For example, var mood = 'Don \'t ask '; alert (mood); Output don't ask.

Var height = "about 5'10 \" tall "; alert (height); output about 5'10" tall.

A single quotation mark in a single quotation mark must be preceded by a backslash \

Similarly, double quotation marks must be added before the double quotation marks \

(3) This is important for functions.

(4) Since the object is programming, leaving this is not called programming.



An object is a set of self-contained data, which can be accessed in two forms: property and method:

The attribute is simply a variable.

The method is simply a function.

They all belong to specific objects. They need to use the dot syntax to access:

Object. property

Object. method ()



(5) built-in objects. Array objects, Math objects, and Date objects are built-in javascript objects. They provide many useful methods for us to use. Built-in objects can help you quickly and easily complete many tasks.

(6) Host object. The exclusive host mainly includes Form, Image, and Element. We can use these objects to obtain information about the form images and various form elements on a given webpage.

Form, Image, and Element. It is rarely used, because there is also an object that can be used to obtain information about any element on a given webpage. It is a very famous document Object.

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.