摘要: 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 阅读(238) 评论(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) 编辑