1.1 JS Basics

Source: Internet
Author: User

2, the code from the top down, from left to right to execute.     Where the function declaration is not important, it is important where it is called. Undefined undefined 3, data type
12,5 Number ' abc ' String
4, the difference between the string and the variable, there is no 5 before the quotation mark, can pass multiple parameters, multiple parameters separated by commas. 6, the operation of the attributes with points or brackets.
obox.style,background= ' red '; obox.style[' background ']= ' red ' points manipulate existing attributes, and brackets can square variables. , as long as the point appears, the brackets must be replaced by the following: the usual use is. Relatively simple []: used when the name is variable. More flexible obj. property name Gets the value of the property obj. property name = value Setting
7. The function encounters parentheses immediately executes the btn.onclick= method name without parentheses
8, anonymous function: No Name function, only used in the case of events only use, also known as the event function 9, window.onload=function () {}; Wait for the browser to load the finished page to execute 10, window.onload the second step gets the element third step execution Event 11 , document.getElementById (' id ')//Gets a set of elements document.getElementsByTagName (TagName) cannot directly manipulate a set of elements subscript starting from 0    arr[Subscript]    12, Loop (4 steps) Definition: operation of a set of elements
1, initialization 2, Condition 3, Statement 4, self-increment
while (condition) {statement}, for (Var i=0;i<length;i++) {}//More Jincu 13, this: represents the element that triggered the event. Who triggered the event is who 14, custom attribute low version browser so that the advanced (Web-compliant) browser is not supported.    Advanced browsers will filter out any attributes that are not present in the Web-only specification.     
    Web page Implementation Section three:    1, the HTML JS CSS to take over    2, the analysis of "The inside of the screen is not standard filter out, filter only once", with JS Plus custom attributes.    3. Execute code

1.1 JS 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.