







function Dog()
{
this.name = "普通的狗";
this.wow = function()
{
alert(this.name + " is wowing!!");
}
this.sleep = function()
{
alert(this.name + " is sleep");
}
}function FlyingDog()
{
this.name = "会飞的狗";
this.wow = function()
{
alert(this.name + " is flying and wowing");
}
}
FlyingDog.prototype = new Dog();
flyingdog = new FlyingDog();
flyingdog.wow();
flyingdog.sleep();
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。