页面加载的过程(简-前端)
摘要:1.DNS解析:域名->IP地址 2.浏览器根据IP地址向服务器发起http请求 3.服务器处理http请求,并返回给浏览器 渲染过程 1.根据html代码生成DOM Tree 2.根据css代码生成CSSOM 3.将DOM Tree和CSSOM整合行程Render Tree 4.根据Render
阅读全文
posted @
2020-04-11 14:14
chenlw101
阅读(1230)
推荐(0)
7.attribute与property
摘要:<ul> <li class="liclass" >11111</li> <li class="liclass">2222</li> <li>3333</li> <li>44444</li> <li>555555</li> </ul> const lilist = document.querySel
阅读全文
posted @
2020-03-26 10:53
chenlw101
阅读(157)
推荐(0)
6.手写实现bind,call,apply
摘要://bind Function.prototype.bind1 = function(){ let args = Array.prototype.slice.call(arguments); let t = args.shift(); let self = this; return function
阅读全文
posted @
2020-03-21 14:54
chenlw101
阅读(307)
推荐(0)
5.this
摘要:function fn1(){ console.log(this) } fn1();//window fn1.call({x:100});//{x:100} const fn2 = fn1.bind({x:200}) fn2();//{x:200} const zhangsan = { name:'
阅读全文
posted @
2020-03-20 16:53
chenlw101
阅读(77)
推荐(0)
4.闭包
摘要:// 闭包:自由变量的查找,是在函数定义的地方,向上级作用域查找 , 不是在执行的地方!!! // 函数作为返回值 function create(){ let a =100; return function(){ console.log(a) } } const fn = create(); co
阅读全文
posted @
2020-03-20 16:41
chenlw101
阅读(91)
推荐(0)
3.原型与原型链
摘要:通过hasOwnProperty('name') 来查看是否是自己的属性 1.原型 // class实际上是函数,可见是语法糖 typeof Student //"function" typeof People //"function" // 隐式原型 和 显示原型 console.log(aaa.
阅读全文
posted @
2020-03-19 18:35
chenlw101
阅读(143)
推荐(0)
2.class、继承、instanceof
摘要:// 父类 class People{ constructor(name){ this.name = name; } eat(){ console.log(`姓名 ${this.name} eat something `) } } // 子类 class Student extends People
阅读全文
posted @
2020-03-19 17:39
chenlw101
阅读(206)
推荐(0)
1.数据类型、typeof、深拷贝、变量计算
摘要:1.数据类型:值类型(Number,String,Boolean,undefined),引用类型(object(包含数组),Null),函数 2.typeod 判断所有的值类型,函数。引用类型无法区分(都是object) 3.深拷贝 3.深拷贝 const obj1 = { age:20, name
阅读全文
posted @
2020-03-19 16:45
chenlw101
阅读(156)
推荐(0)