1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334
| HTML 部分 localStorage 和 cookies
FormData
File API
CSS 部分 float position display flex (用 flexbox froggy 或者阮一峰的博客去学) 水平居中 inline 的水平居中 block 的水平居中 垂直居中 有完整的套路 父节点为 position: relative 自己为 position: absolute top: 50% transform: translateY(-50%) 响应式设计 移动开发 主要是微信网页开发
JS 部分 值类型与引用类型
var a = { v: 1 } var b = a console.log(b.v)
a.v = 2 console.log(b.v)
a = { v: 3 } console.log(b.v)
console.log(a) var a = 1
var a console.log(a) a = 1
console.log(b()) function b() { return 2 }
var b = function() { return 2 } console.log(b())
console.log(c()) var c = function() { return 3 }
var c console.log(c()) c = function() { return 3 }
console.log(d) let d = 4
var x = 0 function test() { console.log(this.x) } var o = {} o.x = 1 o.m = test o.m() o['m']() o.m.apply()
var gua = 'name 001' var foo = function(){ console.log(arguments['0']()) }
var o = {} o.gua = 'name 000' o.func = foo o.func(function(){ return this.gua })
o.func2 = function(){ arguments.gua = 'gua' console.log(arguments[0]()) }
o.func2(function(){ return this.gua })
function Foo() { this.name = 'a' }
var f1 = new Foo() f1.name = 'b' console.log(f1.name)
var f2 = new Foo() console.log(f2.name)
arguments
(function() { return typeof arguments })()
(function() { console.log(arguments) })(1, 2, 3)
(function(...args) { console.log(args) })(1, 2, 3)
call, apply, bind
setTimeout 和 setInterval
setTimeout 与循环结合
for(var i = 0; i < 5; i++) { setTimeout(function() { console.log(new Date(), i) }, 1000) } console.log(new Date(), i)
for (var i = 0; i < 5; i++) { setTimeout(function() { console.log(new Date(), i) }, 0) }
for (let i = 0; i < 5; i++) { setTimeout(function() { console.log(new Date(), i) }, 0) }
let i = 0 for (; i < 5; i++) { setTimeout(function() { console.log(new Date(), i) }, 0) }
事件冒泡, 事件捕获, 事件委托
闭包
var foo = function(){ var i = 0 return function(){ i++ return i } } var a = foo() a() a()
clone 和 deepClone
ajax(可能需要手写原生的 ajax)
HTTP 请求方法, 常见状态码, 头部常见字段
Content-Type Content-Length
跨域 (jsonp, postMessage, cors, 用服务器(比如 node)转发请求和响应)
网络安全: xss, csrf
DOM 操作(查找, 添加, 删除, 修改)
jQuery 常见 API
数据结构 数组 对象 队列 栈 数组、对象、字符串的想换转化 比如 a=1&b=2&c=3 怎样转成对象, 复习基础课程的作业就可以
{ a: 1, b: 2, c: 3, d: 'xxx', e: '', }
ES6 ES6 的面试题一般是概念性质的, 所以清楚下面的概念就可以了 let 和 const, 有一个 TDZ (暂时性死区的概念,了解下即可) 箭头函数 解构 剩余参数(扩展符号) Promise, 可能会附带 async await class Set
var gua = function({name, height}){ console.log(name, height) } var gua2 = function(info){ console.log(info.name, info.height) }
var info = { name: 'gua', height: 169, }
gua(info)
React
React Angular 这 2 个一般只会一个就可以的, 所以这里只说 React 的情况 react 的广告 virtual dom diff 算法的原理 state 和 props 组件生命周期 组件通信:父组件 -> 子组件, 子组件 -> 父组件, A 组件 -> B 组件 React Router(react 路由) Redux/MobX react ui 有两套很流行: Material UI 和 Ant Design, 国内流行的是 Ant Design
|