随笔分类 -  JavaScript

做web开发必须要会的客户端语言
猫和老鼠的委托和事件翻改(JS)
摘要:1// 定义一个猫的类 2function Cat(description) { 3 // 定义一个事件 4 this.description = description; 5 this.cry = null; 6} 7// 添加事件 8Cat.prototype.AddHandler = function(handler) { 9 if (this.cr... 阅读全文
posted @ 2008-07-18 16:10 *海风* 阅读(376) 评论(0) 推荐(0)