随笔分类 -  JavaScript

摘要:javascript里面的this是初学者经常遇到的一个令人费解的关键字,尤其在有多层函数或者回调里面,目前为止,我把this理解为调用当前函数的对象。比如对象a里面有func1和func2,func1里面用this调用了func2,这里的this就可以理解为对象a,而如果func2里面也有this... 阅读全文
posted @ 2015-10-20 14:18 Santiago_1991 阅读(110) 评论(0) 推荐(0)
摘要:// World Geodetic System ==> Mars Geodetic System var pi = 3.14159265358979324; // var a = 6378245.0; var a = 6378245.0; var f = 1/298.3; ... 阅读全文
posted @ 2015-10-20 14:18 Santiago_1991 阅读(599) 评论(0) 推荐(0)
摘要:(一)1.闭包的本质A closure is a special kind of object that combines two things: a function, and the environment in which that function was created.2.闭包的作用A ... 阅读全文
posted @ 2015-10-20 14:17 Santiago_1991 阅读(191) 评论(0) 推荐(0)