摘要: //第1种写法 function Circle(r) { this.r = r; } Circle.PI = 3.14159; Circle.prototype.area = function() { return Circle.PI * this.r * this.r; } var c = new Circle(1.0); alert(c.area()); //第... 阅读全文
posted @ 2016-03-23 12:55 sunbey80 阅读(236) 评论(0) 推荐(0) 编辑