1 / 4
文档名称:

javascript权威指南第八章笔记.ppt

格式:ppt   页数:4页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

javascript权威指南第八章笔记.ppt

上传人:drp539601 2015/10/4 文件大小:0 KB

下载得到文件列表

javascript权威指南第八章笔记.ppt

相关文档

文档介绍

文档介绍:chapter 8
2012-7-29
Javascript: The Definitive Guide
Defining Functions
two ways to define a function
function definition expression
function declaration statement
difference between the above two methods
Invoking Functions
JavaScript functions can be invoked in four ways:
as functions
as methods
as constructors
indirectly through their call() and apply() methods
Method Chaining
When you write a method that does not have a return value of its own, consider having the method return this. If you do this consistently throughout your API, you will enable a style of programming known as method chaining in which an object can be named once and then multiple methods can be invoked on it:
(100).setY(100).setSize(50).setOutline("red").setFill("blue").draw();