The 1th chapter is a brief history of JavaScript. Nothing to remember, the simple introduction of the origin of JS, browser conflicts and so on.
2nd Chapter JavaScript Grammar. It is noteworthy that:
(1) The string is enclosed in single or double quotes, and it is recommended that you use double quotes. (This is a good habit of programming OH)
such as: Var mood= "Happy";
(2) The character escape (escaping) with the back slash \
such as: Var mood= ' don\ ' t ask '; alert (mood); Output don ' t ask.
var height= "about 5 ' 10\" tall "; alert (height); Output about 5 ' tall '.
Single quotes in single quotes need to be in front of single quotes in a string with a backslash \
Similarly, double quotes in a string with double quotes require a backslash before the double quotes in the string
(3) Function This important, here is not much to say.
(4) Since the object is programming, leaving this is not called programming.
An object is a self-contained collection of data that can be accessed in two forms----properties and Methods (method):
Attributes are simply variables
In a simple way, it's a function.
They all belong to a particular object. They need to use the "dot" syntax to access:
Object.property
Object.Method ()
(5) Built-in object. Array objects, math objects, date objects, and so on are built-in objects of JavaScript. They offer a lot of useful ways for us to use. Built-in objects can help the outside to quickly and easily accomplish many tasks.
(6) The host object. Host exclusive includes form, image and element. We can use these objects to get information about the form images and various form elements on a given Web page.
Form, image, and element. Is rarely used, because there is also an object that can be used to obtain information about any element on a given Web page, which is a well-known document object.
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