浏览器缓存机制
摘要:目录一、浏览器缓存机制1、LastModified2、ETag3、expires 一、浏览器缓存机制 1、LastModified const http = require('http') const url = require('url') const path = require('path')
阅读全文
第三章、javascript高级
摘要:目录二十七、知识点回顾1、回调函数方式处理异步所存在的问题2、生成器3、从Generator到async/await 二十七、知识点回顾 1、回调函数方式处理异步所存在的问题 * 无法捕获错误(try catch) * 不能return 2、生成器 function* foo(a) { const
阅读全文
lodash介绍
摘要:目录1、简介2、字符串操作3、算术与数字4、数组操作5、对象操作6、函数操作7、通用工具 1、简介 安装 # es-module支持tree-shaking npm i --save lodash-es # 源码阅读 # 柯里化 # 你不需要lodash:https://github.com/you
阅读全文
iframe通信
摘要:####1、contentWindow方式通信 声明文件 declare global { interface Window { childDefineFunction: (message: string) => void fatherDefineFunction: (message: string
阅读全文
js生成二维码和识别二维码
摘要:<template> <img :src="base64Qrcode" alt="二维码" /> </template> <script lang="ts"> import { defineComponent, ref } from 'vue' // npm install jsqr --save
阅读全文
第二章、javascript高级
摘要:目录十五、Proxy-Reflect vue2-vue3响应式原理1、监听对象的操作2、Proxy和Reflect基本使用3、receiver参数的作用4、Reflect.construct的作用5、响应式原理十六、Promise1、Promise之前2、Promise使用详解3、Promise.p
阅读全文
第一章、javascript高级
摘要:####一、浏览器工作原理和V8引擎 #####1、浏览器内核和js引擎的关系 * WebCore:负责HTML解析、布局、渲染等等相关的工作 * JavaScriptCore:解析、执行JavaScript代码 #####2、V8引擎的原理 * JavaScript源代码 - 词法分析:解析源代码
阅读全文
javascript编辑excel并下载
摘要:<template> <div id="app"> <button @click="writeExcel">按钮</button> </div> </template> <script> export default { name: 'App', data(){ return { table:[ {
阅读全文
javascript-工具函数
摘要:/** * 解析日期 * @param {(Object|string|number)} time * @param {string} cFormat * @returns {string | null} */ export function parseTime(time, cFormat) { i
阅读全文
javascript调用摄像头并截图转file对象
摘要:<!DOCTYPE html> <html> <head> <title>js调用摄像头并截图转file对象</title> <meta charset="utf-8"/> </head> <body> <video id="video" width="300" height="300"></vid
阅读全文
监听属性改变defineProperty和文档碎片createDocumentFragment
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>ll</title> </head> <body> <div id="el"> <div>xxx</div> <div>yyy</div> </div> <sc
阅读全文
javascript数组操作
摘要:#####原始数组 const arr = [{ name: "孟美岐", age: 18 }, { name: "黄婷婷", age: 19 }, { name: "鞠婧祎", age: 20 }, { name: "佟丽娅", age: 21 }, { name: "林志玲", age: 22
阅读全文
javascript-offset+scroll+client+screen
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>study</title> </head> <body> <div style="height: 1000px"></div> <div class="out"
阅读全文
javascript阻止事件捕获、默认事件和事件冒泡
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>study</title> </head> <body> <div class="out" oncontextmenu="myout(event)"> <div
阅读全文
javascript类型判断+函数内置对象arguments+js遍历json对象
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>study</title> </head> <body> <script> window.onload = function () { console.log(
阅读全文
javascript拖拽移入
摘要:<template> <div id="app"> <div class="div1" @mousedown.prevent="dragstart($event)"></div> <div class="div2" @mouseover.prevent="dragover"></div> </div
阅读全文
javascript原型和继承
摘要:目录一、继承二、原型三、原型三角图四、设置原型对象 一、继承 function Person(name) { // 成员变量 this.name = name; } // 成员方法 Person.prototype.eat = function () { console.log("吃饭") }; /
阅读全文
正则表达式
摘要:一、量词 二、方括号 三、修饰符 四、元字符
阅读全文