3j $ {JSON jquery JavaScript}

Source: Internet
Author: User

Javascript

  1. Class

    For object-orientedProgramClass is the most familiar key word. For Classes in JS, it refers to objects.

    The new object is generated by the new operator and its object constructor.

    Ex:

    VaR Rui = new Rico ();

  2. Attribute

    There is no practical significance for the existence of light classes. We must pair something with it to form a powerful Power

    Property, just like an object on the server side. js objects can contain data, method, Etc ..

    All attributes are composed of names and values. The attribute name is a string, and the value can be any JS object.

    Ex:

    VaR Rui = new Rico ();

    Rui. Hand = "two ";

    Rui. Leg = 2;

    Rui. Birthday = new date (19xx, 8, 1X );

    Nested attributes

  3. Reference Operator

    *We generally use vertices
    .
    Operator to reference the attributes of an object;

    If there is an attribute named(RICO. Rui)If you directly useError!

    The format of the passed attribute reference operator isObject [propertynameexpression]

    Ex:

    Object. Rico

    Object ['rico']

    Object ['R' + 'I' + 'C' + 'O']

    Or

    VaR r = 'rico ';

    Object [R];

  4. JavaScript Object Notation)

    It is annoying to use the new operator to create a new instance and assign each attribute to create an object using an independent value assignment statement.

    In this case, we can use the object literal to create a object.

    VaR Rui = {

    Hand: "two ",

    Leg: 2,

    Birthday: new date (19xx, 8, 1X ),

    Lei :{

    MM: Max,

    }

    };

     

    // Todo

  5. Storage reference
  6. Function
  7. Callback Function
  8. This
  9. Closure
Related Article

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.