![]() |
#2
aspic2012-08-24 11:18
|

<script language="javascript">
function Fa()
{
alert("Fa Creator");
}
function Fb()
{
alert("Fb Creator");
}
Fb.prototype._proto_ = Fa.prototype;
a = new Fa();
b = new Fb();
Fa.prototype.p = "hello";
alert(a.p); //hello
alert(b.p); //undefined???
</script>
alert(b.p); //undefined???
为什么呢? 我觉得也是hello啊