A collection of 13 posts

面试题

怎么判断一个变量是null 先看一下 typeof 所能检测的值 console.log('""',typeof '') // string console.log('new String()',typeof new String()) //object ...

前端多线程--web worker

创建web worker var worker = new Worker("./js/state.js") 向webworker发送消息 worker.postMessage('1232') 接受webworker传递的参数 worker.onmessage = function (evt) { //接收worker传过来的数据函数 console. ...