OOP
九月上
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
this,call,apply
this 对象 var name='Jack'; function show(){ console.log(this.name); console.log(this);//window } window.show(); call(thisArg, arg1, arg2, ...)(可多参) apply(thisArg, [argsArray])(只可传入两参,第...原创 2019-02-21 20:18:20 · 164 阅读 · 0 评论 -
prototype -----原型 json方式创建对象
prototype -----原型 (实例对象才有prototype) 例: function Stu(){ this.name='jack'; this.age=20; } Stu.prototype.run=function(){ console.log('run....'); }; var stu=new Stu(); var a1=stu.run(); va...原创 2019-02-21 19:58:05 · 404 阅读 · 0 评论 -
OOP----面向对象编程
OOP----面向对象编程 class 类 1.javascript没有class (ES5) javascript的面向对象是一种非正统的怪异的面向对象 2.使用function来模拟对象 3.对象: 一切皆对象 对象包含:方法 属性 属性: 特性 ...原创 2019-02-20 20:35:54 · 148 阅读 · 0 评论 -
web存储
1.web存储: cookie 早期 本地存储: localStorage 永久存储 除非手动删除 sessionStorage 临时存储 (当存储关闭时,清除,只在当前页面生效) 两个存储...原创 2019-02-22 21:37:36 · 162 阅读 · 0 评论
分享