6、原型对象
??????? function Cat() {
??????????? this._name = "small wang",
??????????? this._age = 1;
??????? }
??????? Cat.prototype.speak = function () {
??????????? alert("Meeeeeeooow!");
??????? }
??????? var cat = new Cat();
??????? cat.speak();
轉載于:https://www.cnblogs.com/extensivewang/archive/2011/11/09/2242115.html
總結
- 上一篇: 大卸iphone十八块..iphone
- 下一篇: 继承专题