![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 139 阅读 · 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 · 85 阅读 · 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 · 82 阅读 · 0 评论