Python Day 52 front-end

  ## Recap

Javascript

1, three kinds of ways introduced
2, weak language - scripting language - programming language
3, variable - four kinds of no let const var keyword
4, the data type - value types, reference types - string | array.splice (begin, length, args) | dic.key dic [ 'key']
5, the control process: if () {} else if () {} else {} | while () {} | for (①; ②; ③) {④}
6, the function: Parameter List - formal and actual parameters number need not uniform
7, js page interactive
    1) First get the page labels
        js selector: getElemet | querySelector (All)
    2) event binding: on the event name
        Mouse events, keyboard events, form events
    3) Operation tab
        Style, attributes, content
        div.style.color
        getComputedStyle(div, null).backgroundColor
        div.setAttribute('class', 'box')
        div.getAttribute('class')
        div.innerText (innerHTML)
        inp.value

  ## jquery framework

#1、what: 
    jQuery secondary packaging for the kit js
    Secondary packaging: js than easy to use, and the integrated operation (write a sentence js jq can achieve more logical) ratio is, the bottom is native js
    Kit: jq is the collection of a bunch of functions, by jq object to call (jQuery)
    
#2、why:
    With Quick js

#3、where:
    Use js places can be used jq

#4、how:
1. Download the official website: https: //jquery.com/download/
    jquery-3.4.1.js | jquery-3.4.1.min.js
    
2. Use jq jq page requires environment
< Script the src = "JS / jQuery-3.4.1.js" > </ Script > 
< Script > 
    // $ is jQuery object, all functions may be used jQuery 
</ Script >

The API learning jq: http: //jquery.cuishifeng.cn/

 

Guess you like

Origin www.cnblogs.com/liangzhenghong/p/11139546.html