摘要: https://img2022.cnblogs.com/blog/1944923/202206/1944923-20220621222927397-1836968302.png 123 一、this指向 原则是谁调用,就指向谁 1:common function,this指向Window funct 阅读全文
posted @ 2022-06-13 01:07 码农-编程小子 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 1:array groupconst groups = [1,2,3,2,4,3,1].reduce((prev, curr) => { if (!prev.includes(curr)) { prev.push(curr); } return prev; }, []); 阅读全文
posted @ 2022-05-30 15:00 码农-编程小子 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 1: 增加db,名称 my.db https://www.sqlite.org/download.html 您需要下载 sqlite-tools-win32-*.zip 和 sqlite-dll-win32-*.zip 压缩文件 CREATE TABLE TaoCan( ID INT PRIMARY 阅读全文
posted @ 2022-05-27 18:00 码农-编程小子 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 1.获取本地的镜像地址 npm get registry 2.设置成淘宝的镜像源 npm config set registry http://registry.npm.taobao.org/ 2.设置成原本的镜像源 即nodejs的默认镜像源 npm config set registry htt 阅读全文
posted @ 2022-05-25 14:39 码农-编程小子 阅读(380) 评论(0) 推荐(0) 编辑
摘要: config.js export const cookieStr = 'WTSESSIONID=155f7788cc3dcbae54a007a35e91.crm-web-wt-g2-srv15; BOMC_PROBE_ID=FB4D90E3F77ADE943B223DB764052EBE222EB5 阅读全文
posted @ 2022-05-24 21:15 码农-编程小子 阅读(825) 评论(0) 推荐(0) 编辑
摘要: touchStart touchMove touchEnd 1. 如果点击屏幕,会触发touchStart,touchEnd,click事件2. 如果点击屏幕并且有划动,会触发touchStart,touchMove,touchEnd事件3. touchmove和click是相斥4. 在移动端点击两 阅读全文
posted @ 2022-05-20 09:53 码农-编程小子 阅读(700) 评论(0) 推荐(0) 编辑
摘要: jsonp(JSON with Padding)是一种使用模式,可以实现跨域获取数据,原理是基于由于script标签不受限于同源策略,script标签可以通过src属性请求到其他服务器上的数据 浏览器同源策略:在当前网页中,若想到发送一个请求,请求url必须满足 协议,域名,端口 三者相同,才能得到 阅读全文
posted @ 2022-05-17 23:40 码农-编程小子 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 一、EventTarget 接口事件是程序各个组成部分之间的一种通信方式,DOM 节点的事件操作(监听和触发),都定义在EventTarget接口addEventListener():绑定事件的监听函数removeEventListener():移除事件的监听函数dispatchEvent():触发 阅读全文
posted @ 2022-05-17 09:39 码农-编程小子 阅读(41) 评论(0) 推荐(0) 编辑
摘要: let arrs=[1,2,3,4,5] //1: forEach循环 try{ arrs.forEach(function(i){ if(i == 2){ // return; // 退出当前循环 throw 'jump out'//退出整个循环 } console.log(i) }) }catc 阅读全文
posted @ 2022-01-05 10:33 码农-编程小子 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 例1 选择title属性值为 honor/荣耀的span元素 document.querySelector("#sale-card .next-cascader-menu li span[title='honor/荣耀']").click() 例2 css伪类选择器 li:nth-child(eve 阅读全文
posted @ 2021-11-08 01:54 码农-编程小子 阅读(85) 评论(0) 推荐(0) 编辑