js this keyword
来源:互联网 发布:java中md5加密设置位数 编辑:程序博客网 时间:2024/05/17 22:23
Finally a value is assigned for use with the this
keyword. If the value assigned refers to an object then property accessors prefixed with the this
keyword reference properties of that object. If the value assigned (internally) is null then the this
keyword will refer to the global object.
最后,在this可以被使用之前,还必须先对其赋值。如果赋的值是一个对象的引用,则 this.m 访问的便是该对象上的 m。如果(内部)赋的值是 null,则this就指向全局对象。
refer to
http://www.cn-cuckoo.com/wordpress/wp-content/uploads/2007/08/JavaScriptClosures.html
this 指定当前对象一个对象就是由
一个或多个属性(方法)组成的集合。每个集合元素不是仅能属于一个集合,而是可以动态
的属于多个集合。这样,一个方法(集合元素)由谁调用,this指针就指向谁。实际上,前
面介绍的apply方法和call方法都是通过强制改变this指针的值来实现的,使this指针指向
参数所指定的对象,从而达到将一个对象的方法作为另一个对象的方法运行的效果。
refer to
http://hi.baidu.com/dp_vance/blog/item/b9c80bfb76bf0a264f4aea86.html
function foo()内的this.abc与function foo()外的foo.prototype.abc等价 function foo()内的foo.abc与function foo()外的foo.abc等价,function foo()内的this.abc和foo.abc存在时不再取function foo()外的等价属性。
先写到这,请大家指点。
javascript静态方法属性对象,非静态方法属性,有人说“关于静态方法你对js的理解本身就是错误的,更让我惊讶的是到处都是这样错误的写法”待修正
refer to
http://blog.tugai.net/2009/03/07/javascript-static-class-mothed-property/
/////http://hi.baidu.com/pop123shen/blog/category/Js%20This
- js this keyword
- The 'this' keyword
- Understanding JavaScript this keyword
- JavaScript’s ‘this’ Keyword
- the this keyword in javascript
- Day14-47.The this keyword
- keyword
- Java重载Constructor的相互引用(keyword:this)
- jquery&js $(this) & this
- js this
- JS this
- JS this
- js this
- js this
- js this
- js this
- JS this
- [js] this
- 关于vc下dll的相关知识
- 第一次在csdn写博文
- 为什么要学Win32及Win32程序框架
- 再谈计算机编程的学习
- 多媒体函数简介
- js this keyword
- 用自删除dll实现应用程序的安装/卸载代码
- 用 PHP 读取和编写 XML DOM
- GCC-3.4.6源代码学习笔记(59)
- MFC ActiveX 控件
- 关于asp.net[没有相关的源行]错误的解决方法及IIS安装问题
- MFC ActiveX 控件:属性页【转】
- 编程语言究竟学什么?
- GCC笔记