摘要:
1.公有属性和公有方法 1 2 3 4 5 6 7 8 9 function User(name,age){ this.name = name;//公有属性 this.age = age; } User.prototype.getName = function(){//公有方法 return thi 阅读全文
posted @ 2017-10-11 20:22
海阔天空98
阅读(956)
评论(0)
推荐(1)
摘要:
this简介: this永远指向当前正在被执行的函数或方法的owner。例如: 1 2 3 4 5 function test(){ console.log(this); } test(); //Window {top: Window, window: Window, location: Locat 阅读全文
posted @ 2017-10-11 19:01
海阔天空98
阅读(842)
评论(0)
推荐(0)
浙公网安备 33010602011771号