jQuery拖拽效果,自己写的,能用 jquery使用class,能用,jquery用原生<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style.
promise将回调函数取代,解决回调地狱 ajax回调函数版本// 防抖function antishake(func, wait) { let timer = null return function () { clearTimeout(timer) timer = setTimeout(() => { func() }, wait) }}// 节流function throttle(func,wait){ // let t
自己封装的ajax,以及使用介绍 ajax封装(只适用于POST以及GET)传入的参数都是必传入的,解构方法解构的数据没有默认值设置// 防抖function antishake(func, wait) { let timer = null return function () { clearTimeout(timer) timer = setTimeout(() => { func() }, wait) }}// 节流fu.
面对对象和tab栏切换 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title></head><body> <script&g.
闭包,防抖、节流、函数柯里化 闭包<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title></head><body> <scri
ajax分页效果 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .active { .