JavaScript实现继承
摘要:
我觉得最清晰的方式是试用prototype,如下: var animal = function(){ this.name = 'pipi'; this.age = 10; this.height = 0; } var cat = function() { this.play = function() { alert("cat play"); } cat.prototype = new ani... 阅读全文
posted @ 2010-03-21 01:59 MikeJia 阅读(158) 评论(0) 推荐(0)
浙公网安备 33010602011771号