- 博客(6)
- 收藏
- 关注
转载 react 内存溢出问题
警告 : Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks ...
2019-07-18 16:55:00
1076
转载 html5--新增的input类型和属性
1. color js写法: <input type="color" onchange="change()" id="color"> function change(){ var color=document.querySelector("#color"); console.log(color.va...
2019-07-11 17:22:00
199
转载 构造函数--3.prototype
1.为什么会出现 prototype 这个关键字 使用构造函数创建对象 不是共享的 浪费内存 例子: function Demo(name,age){ this.name = name this.age = age this.sing = function(){ ...
2019-07-10 23:14:00
135
转载 构造函数--2.成员
function Demo(name,age){ this.name = name this.age = age this.sing = function(){ console.log(this.name + "唱歌") } ...
2019-07-10 22:26:00
180
转载 构造函数--1.创建
function Demo(name,age){ this.name = name this.age = age this.sing = function(){ console.log(this.name + "唱歌") } } let lx = new Demo('张三',10) lx.sing() 转载于:https://www.cnblogs.com...
2019-07-10 22:16:00
160
转载 使用 new 创造对象,new执行时做的四件事·
1.在内存中创建一个空对象 2.让this 指向这个新对象 3.执行构造函数里面的代码,给这个对象添加属性和方法 4.返回这个新对象(构造函数不需要return) 转载于:https://www.cnblogs.com/ruoxiangli/p/11166905.html...
2019-07-10 22:07:00
1035
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅