摘要: 一、EventUtil.js 具体可参考《EventUtil——跨浏览器的事件对象》 地址: https://www.cnblogs.com/hykun/p/EventUtil.html var EventUtil = { addHandler: function(element, type, ha 阅读全文
posted @ 2019-07-29 10:17 BLZC 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 你可能知道,Javascript语言的执行环境是"单线程"(single thread)。 所谓"单线程",就是指一次只能完成一件任务。如果有多个任务,就必须排队,前面一个任务完成,再执行后面一个任务,以此类推。 这种模式的好处是实现起来比较简单,执行环境相对单纯;坏处是只要有一个任务耗时很长,后面 阅读全文
posted @ 2019-06-27 17:42 BLZC 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 前言 内存泄漏指由于疏忽或错误造成程序未能释放已经不再使用的内存。内存泄漏并非指内存在物理上的消失,而是应用程序分配某段内存后,由于设计错误,导致在释放该段内存之前就失去了对该段内存的控制,从而造成了内存的浪费。这里就讲一些常见会带来内存泄露的原因。 0. 全局变量 JavaScript自由的其中一 阅读全文
posted @ 2019-06-03 00:47 BLZC 阅读(619) 评论(0) 推荐(0) 编辑
摘要: function* fibonacci() { let [prev, curr] = [0, 1]; for (;;) { yield curr; [prev, curr] = [curr, prev + curr]; } } for (let n of fibonacci()) { if (n > 阅读全文
posted @ 2019-05-19 15:05 BLZC 阅读(563) 评论(0) 推荐(0) 编辑
摘要: 要求: 解答: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta ht 阅读全文
posted @ 2019-04-04 16:52 BLZC 阅读(312) 评论(0) 推荐(0) 编辑
摘要: export default { a: "\u554a\u963f\u9515", ai: "\u57c3\u6328\u54ce\u5509\u54c0\u7691\u764c\u853c\u77ee\u827e\u788d\u7231\u9698\u8bf6\u6371\u55f3\u55cc\ 阅读全文
posted @ 2019-04-02 14:19 BLZC 阅读(2911) 评论(0) 推荐(0) 编辑
摘要: 思路:若为二叉搜索树,则中序遍历为递增的 let arr = [15,8,16,6,10];let pindex = [];function Node(){ this.root = null; this.left = null; this.right = null;} //构建完全二叉树functi 阅读全文
posted @ 2019-04-01 14:17 BLZC 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 1. 一些常见的数据类型题 typeof undefined == typeof NULL typeof undefined typeof NULL typeof NULL "undefined" typeof function(){} "function" typeof class {} "fun 阅读全文
posted @ 2019-04-01 09:26 BLZC 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 1.在官网下载一个ueditor版本[https://ueditor.baidu.com/website/download.html],解压后放到public文件下的static文件中重命名为Editor (自己建立一个static文件,直接放到public文件下会出错)。 2.修改相应的配置。 u 阅读全文
posted @ 2019-03-22 18:12 BLZC 阅读(1348) 评论(0) 推荐(0) 编辑
摘要: 1.汉字: 直接添加对应的 filterable 2.拼音: 穿梭框和选择器的实现方式有所不同 选择器: <1>下载pinyin-match: npm i --save pinyin-match <2>在main.js引入并注册为全局属性 import PinyinMatch from 'pinyi 阅读全文
posted @ 2019-03-22 17:57 BLZC 阅读(1345) 评论(0) 推荐(0) 编辑