摘要: .prevent 阻止默认行为(阻止a链接的跳转、阻止表单的提交等) .stop阻止事件冒泡 .capture以捕获模式触发当前的事件处理函数 .once 绑定的事件只触发一次 .self 只有再event.target是当前元素自身时触发事件处理函数 阅读全文
posted @ 2021-10-08 17:01 ajaXJson 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 宏任务 异步Ajax请求 setTimeout、setInterval 文件操作 其他宏任务 微任务 Promise.then、.catch和.finally process.nextTick 其他微任务 执行机制: setTimeoit(function(){console.log('1')})n 阅读全文
posted @ 2021-10-08 11:52 ajaXJson 阅读(186) 评论(0) 推荐(0) 编辑
摘要: console.log('A')async function getAllFile(){console.log('B')const r1 = await thenFs.readFile('./files/1.txt','utf8')const r2 = await thenFs.readFile(' 阅读全文
posted @ 2021-10-08 11:16 ajaXJson 阅读(198) 评论(0) 推荐(0) 编辑