阿不

在腾讯微博和新浪微博 @hjf1223 ,最新的技术观点在那

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  211 随笔 :: 0 文章 :: 3011 评论 :: 75 引用

公告

book = function(name,count) { /* instance property*/ this._pageCount = count; /* closure start*/ var _name = name; //private member /* instance method */ this.getName = function() { return _name; } /* closure end*/ /*private static member*/ _type = "class"; } /* public static member */ book.className = "book"; /* prototype method*/ book.prototype.getCount = function() { return this._pageCount; }; //static method book.getType = function() { //访问静态的私有变量 return _type; } book.getClassName = function() { //访问静态公有访问 return this.className; }
posted on 2006-12-08 13:25 阿不 阅读(1120) 评论(1) 编辑 收藏