面试题
怎么判断一个变量是null 先看一下 typeof 所能检测的值 console.log('""',typeof '') // string console.log('new String()',typeof new String()) //object ...
怎么判断一个变量是null 先看一下 typeof 所能检测的值 console.log('""',typeof '') // string console.log('new String()',typeof new String()) //object ...
1.jQuery 1. ajax的xhrFields参数 $.ajax({ type:'post', url: "http://172.16.0.152:3000/post.do", xhrFields: {withCredentials: true}, success: ...
前端1px解决方案 取自vux源码,链接 vux-1px, .vux-1px-t, .vux-1px-b, .vux-1px-tb, .vux-1px-l, .vux-1px-r { position: relative; } .vux-1px:before { content: " "; position: absolute; left: 0; top: 0; ...
创建web worker var worker = new Worker("./js/state.js") 向webworker发送消息 worker.postMessage('1232') 接受webworker传递的参数 worker.onmessage = function (evt) { //接收worker传过来的数据函数 console. ...
前言 利用nodejs作为后台服务,使用nginx解决跨域或者在node中接受跨域请求,使用mock做假数据。 安装库 1. http-server 2. supervisor 3. mock 4. nginx 过程 1. 在前端页面所在文件夹内,调出命令行,输入 http-server 。将本目录作为服务器根目录。 ...