标签:javascrip action text var arguments color this 继承 div
<script type="text/javascript">
function Animal(){
this.species = "动物";
this.action = function(){alert("会跑");};
}
function Cat(name,color){
this.name = name;
this.color = color;
}
function Cat(name,color){
Animal.apply(this,arguments);
this.name = name;
this.color = color;
}
var cat1 = new Cat("大毛","黄色");
alert(cat1.action());
</script>
标签:javascrip action text var arguments color this 继承 div
原文地址:http://www.cnblogs.com/gaomin-s/p/6933533.html