<script>
function TestObjectA()
{
this.MethodA = function()
{
alert('TestObjectA.MethodA()');
}
}

function TestObjectB()
{
this.MethodB = function()
{
alert('TestObjectB.MethodB()');
}
}

TestObjectB.prototype = new TestObjectA();
var dd = new TestObjectB();
dd.MethodB();
dd.MethodA();

</script>

posted on 2007-10-25 15:14  AGPSky  阅读(434)  评论(0编辑  收藏  举报