day 43

Recap: 

the JavaScript: 
(. 1) ECMAScript5 basic grammar 
    - declaring a variable var 
    - Flow Control 
              IF IF the else the else 
              
              the while 
              
              for 
              
              do the while- 


              Switch 
    - Operator 
            + ++ == - = 
            ==: comparing the value 
            === : comparison of the values and data type 
            =! 
            ==! 
            > 
            < 
    - data type 
        basic data types 
            String 
            Number 
            Boolean 
            null 
            undefined 
        complex data types
         
            (1) create a literal manner
                ARR var = [];
                
             
                    }(2) the Array new new () 
            the Array 
            
            
            Object 
            
            JSON 
            create a literal manner 
            var Person = {
                 name: 'Alex', 
                Age: 18 is, 
                FAV: function () { 
                    Alert (this.name) 
                } 
            }; 
            
            PERSON.NAME; 
            
            person.fav (); 
            
            
            {key1: VALUE1, key2: DEF} 
            
            function     
                    normal function 
                    function the Add (X, Y) { 
                        return X + Y; 
                    the Add (1,2); 
                    function object 
                    var the Add = function (X, Y) {
                         return X + Y; 
                    } 
                    the Add (3,4-) 
                    
            arguments 
                    argument that it is a dummy array length index object inside 
                    
                    the DOM   
                    var oDivs = document.getElementsByClassName ( 'box'); 
            
                        
                        
                        
today content: 
- DOM 
    the document Object model 
    document Object model 
    
    objects: 
        properties and methods 
        
        properties: Gets the value and assignment 
        methods: assignment method and the method call 
        
    DOM tree 
                the document 
        
                 HTML 

      head body
    
Meta Link .. div.header div.content title div.footer 



- the acquired DOM 
    
    1. document object acquires 
    the console.log (document); 
    
    2. Gets the html 
    document.documentElement 
    
    3. Get body object 
    document.body 
    
    
    
    provides three methods the acquired DOM body 
    div # box.box 
    by id Get 
    document.getElementById ( 'box'); 
    
    obtained by the class 
    Li 
    Li 
    Li 
    var Olis = document.getElementsByClassName ( 'Box'); 
    
    for (var I = 0; I < olis.length; I ++) { 
    
        Olis [I] .onclick = function () { 
        
            Alert (this.innerText); 
        } 
    } 
    
    acquired by the tag 
    var oDivsDocument.getElementsByTagName = ( 'div'); 

    jQuery 
    
    the DOM three-step 
    
        1, obtaining an event source 
        2, the onmouseover onmouseout event binding the onclick 
        . 3, the event-driven (business logic) 
    
    
        - operation of the tag style properties 
            
            oDiv.onclick   = function () {
             // set point syntax readonly get method can read only 
                the console.log (this.style); 
                this.style = null; 
                
                this.style.width = '200px';
                 this.style.marginLeft = '40px';
             } 
        
        
        - of operation tag attributes 
        
        ID 
        class 
        the src 
        Alt 
        the href 
        title  
        of the type
        name
        
        
         
        - the operation of the value of 
            innerText 
                - get only the text 
            
            the innerHTML 
                - get text labels and 
            value 
            - Events     
            
            
        - operating on the DOM object (CRUD) 
        
        - control element show hidden 
            applications: a web page to switch recommended frequent use of this 
            1. Control show hidden attribute style.display 
            2. control the elements className show hidden 
            
            problem: there is initialized when rendering 
            
            applications: a web page using a small amount of switching is recommended 
            to create 3. elements and destruction of 
             the life cycle of fire and water 
             
             
             
        java c # asp c ++ go nodejs python php 
        1. look company 
        2. main language java + python backend 
         interfaces api https://www.luffycity.com/course
         
         Front-end + nodejs (background language)
         
        Product Manager 
            in accordance with the needs of users 
        UI 
            
        front-end 
        back-end
                
                
                
                

11

Guess you like

Origin www.cnblogs.com/xiaobai686/p/11933397.html