87,907
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<html lang = "zh-cmn-Hans">
<head>
<title>继承的四种模式</title>
<meta charset = "utf-8">
</head>
<body>
<script type = "text/javascript">
function A () {}
var a = new A();
B.prototype = a;
function B () {}
var b = new B();
C.prototype = b;
function C () {}
console.log( b ); //A{}为何控制台输出的b被认为是A类型?
</script>
</body>
</html>