Javascript 继承 图形化展示
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gbk"> </head> <body> <script type="text/javascript"> function Person(){}; Person.Name = "ren"; Person.prototype.Age = 30; function Father(name){this.Name=name;}; //继承 产生 Father var personA = new Person(); Father.prototype= personA;//new Person(); Father.prototype.constructor = Father; var fatherA = new Father("fatherA"); function Son (){}; Son.prototype = fatherA; Son.prototype.constructor = Son; var sonA = new son; </script> </body> </html>
![](https://images2015.cnblogs.com/blog/193782/201701/193782-20170117155023567-168616353.png)