上一页 1 2 3 4 5 6 7 8 9 10 ··· 26 下一页
摘要: 阅读全文
posted @ 2020-06-12 06:52 TTtttt5 阅读(76) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/supperi/article/details/106673051 阅读全文
posted @ 2020-06-11 20:50 TTtttt5 阅读(108) 评论(0) 推荐(0) 编辑
摘要: let load =(cb) =>{ let timer let check = ()=>{ if(performance.timing.loadEventEnd){ clearTimeout(timer) cb() }else{ timer = setTimeout(check,100) } } 阅读全文
posted @ 2020-06-10 22:42 TTtttt5 阅读(133) 评论(0) 推荐(0) 编辑
摘要: html = html.replace(/\{\{([^}]+)\}\}/g, function () { console.log(arguments[1]); })这是匹配{{name}}这种,arguments[1]是取到()里的值,这里是取到name 阅读全文
posted @ 2020-06-10 15:47 TTtttt5 阅读(237) 评论(0) 推荐(0) 编辑
摘要: console.log(1); async function async () { console.log(2); await console.log(3); console.log(4) } setTimeout(() => { console.log(5); }, 0); const promi 阅读全文
posted @ 2020-06-10 06:38 TTtttt5 阅读(349) 评论(0) 推荐(0) 编辑
摘要: <script> button.addEventListener('click',()=>{ console.log('listener1'); Promise.resolve().then(()=>console.log('micro task1')) }) button.addEventList 阅读全文
posted @ 2020-06-09 23:25 TTtttt5 阅读(1256) 评论(1) 推荐(0) 编辑
摘要: <script> document.body.style.background = 'red'; console.log(1) Promise.resolve().then(()=>{ console.log(2) document.body.style.background = 'yellow'; 阅读全文
posted @ 2020-06-09 22:57 TTtttt5 阅读(241) 评论(0) 推荐(0) 编辑
摘要: http://zhufengpeixun.com/jg-vue/node/async-1.html#%E7%B1%BB%E5%9E%8B%E6%A3%80%E6%B5%8B 阅读全文
posted @ 2020-06-09 22:17 TTtttt5 阅读(94) 评论(0) 推荐(0) 编辑
摘要: // tj async+await = generator +co function co(it){ return new Promise((resolve,reject)=>{ // 异步迭代 需要next函数 function next(r){ let {value,done} = it.nex 阅读全文
posted @ 2020-06-09 22:15 TTtttt5 阅读(193) 评论(0) 推荐(0) 编辑
摘要: //generator 生成器 =》遍历器(需要有一个next方法)=》数组=》类数组 //...原理就是遍历这个对象,将结果放到数组中,这个数据必须得有个遍历器。[...new Set()] for of //[...likeArray] /Array.from(likeArray) const 阅读全文
posted @ 2020-06-09 21:46 TTtttt5 阅读(128) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 26 下一页