Python Day 52 前端

  ##内容回顾

Javascript

1、三种引入方式
2、弱语言 - 脚本语言 - 编程语言
3、变量 - 四种 let const var 无关键字
4、数据类型 - 值类型、引用类型 - string | array.splice(begin, length, args) | dic.key dic['key']
5、流程控制:if(){}else if(){}else{} | while(){} | for(①;②;③){④}
6、函数:参数列表 - 形参和实参个数不需要统一
7、js页面交互
    1)先获取页面标签
        js选择器:getElemet | querySelector(All)
    2)事件绑定:on事件名
        鼠标事件、键盘事件、表单事件
    3)操作标签
        样式、属性、内容
        div.style.color
        getComputedStyle(div, null).backgroundColor
        div.setAttribute('class', 'box')
        div.getAttribute('class')
        div.innerText(innerHTML)
        inp.value

  ##jquery框架

#1、what: 
    jQuery是对js进行的二次封装的工具包
    二次封装:比js使用起来便捷了,操作比就是综合了(写一句jq可以实现多句js逻辑),底层就是原生js
    工具包:jq就是一堆函数的集合体,通过jq对象来调用(jQuery)
    
#2、why:
    跟快速使用js

#3、where:
    使用js的地方都可以使用jq

#4、how:
1.官网下载:https://jquery.com/download/
    jquery-3.4.1.js | jquery-3.4.1.min.js
    
2.在 需要jq环境的页面中 使用jq
<script src="js/jquery-3.4.1.js"></script>
<script>
    // $ 就是jQuery对象,可以使用jQuery的所有功能
</script>

3.根据API学习jq:http://jquery.cuishifeng.cn/

猜你喜欢

转载自www.cnblogs.com/liangzhenghong/p/11139546.html