<!DOCTYPE html>
<html>
<head>
<meta charset="utf
<title>面向對象繼承實例</title>
<script type="text/javascript">
window
function parent(age
this
this
}
parent
alert(
}
function child(age
parent
this
}
(function(){
for(var i in parent
child
}
})();
var b = new parent(
var a = new child(
a
}
</script>
</head>
<body>
<h
<p>經常看到面試題有關繼承問題 a如何繼承b 決定寫一下
</body>
</html>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20044.html