摘要: 1.es6不存在变量提升,声明的class在它之前拿不到 2.class内部会开启严格模式, 比如constructor 直接写 a = 12, 不行的 3.class必须用new调用,不能被() call 4.class中所有方法不可枚举 5.es5原型链定义了Father和Son,Son.__p 阅读全文
posted @ 2020-06-12 17:40 hh9515 阅读(793) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-06-12 13:59 hh9515 阅读(135) 评论(0) 推荐(0)
摘要: 前者是 a=b&b=c&c=%asdf&xxx 是一种键值对的形式,中间以&作为分隔符,其实就像浏览器地址框中的url一样会被转义。也就是会被js中encodeURIComponent方法 后者可以理解为是一种增强的变种,用于传输文件,因为内部不会被转义,分隔符也不再是& 在请求头的content- 阅读全文
posted @ 2020-06-12 03:00 hh9515 阅读(243) 评论(0) 推荐(0)
摘要: var xhr = new XMLHttpRequest() xhr.onreadystatechange = function(){ if(xhr.readyStatus 4 && xhr.status == 200){ console.log( xhr.responseText ) } } xh 阅读全文
posted @ 2020-06-12 01:27 hh9515 阅读(74) 评论(0) 推荐(0)
摘要: 资料: https://www.qinguanghui.com/react/%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%80%E5%B8%A7%E9%87%8C%E5%81%9A%E4%BA%86%E4%BB%80%E4%B9%88.html#vue-nexttick-%E4 阅读全文
posted @ 2020-06-12 00:51 hh9515 阅读(153) 评论(0) 推荐(0)
摘要: 总结: 因为如果使用macrotask, vue的batch (一个一个执行nextTick内部维护数组中的函数) 的这个操作会放在下一个macrotask中执行, 当你调用nextTick的script解析完之后马上要开始执行微任务,微任务后又是宏任务微任务,(这个中间可能执行了很多个其他macr 阅读全文
posted @ 2020-06-12 00:21 hh9515 阅读(743) 评论(0) 推荐(0)