
JavaScript
iteye_15448
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
JavaScript 字符串连接
[code="JavaScript"]function StringBuffer () { this._strings_ = new Array(); } StringBuffer.prototype.append = function(str) { this._strings_.push(str); }; StringBuffer.prototype.toString...原创 2012-07-23 20:32:14 · 191 阅读 · 0 评论 -
JavaScript 继承
[code="javascript"] //父类 function ClassA(sColor) { //Define Properties this.color = sColor; this.drivers = new Array("Mike","John"); this.showColor = function() { prt(this.col...原创 2012-07-23 22:58:17 · 104 阅读 · 0 评论 -
JavaScript 类,对象
[b]1. 构造函数方式[/b][code="javascript"]function Car(sColor,iDoors,iMpg) { this.color = sColor; this.doors = iDoors; this.mpg = iMpg; this.showColor = function() { alert(this.color); ...原创 2012-07-23 23:06:05 · 131 阅读 · 0 评论