function parent()
{
var id=1;
var username="roboth";
this.getID=function(){return id;}
this.getUserName=function(){return username;}
}
function child()
{}
var child1=new child();
createInheritance(new parent(),child1);
function createInheritance(parent,child)
{
var pro;
for (pro in parnet)
{
if(!child[pro])
{
child[pro]=parent[pro];
}
}
}
posted @ 2007-07-30 12:02
Robot·H 阅读(24)
评论(0) 编辑 收藏 所属分类:
CSS+Javacript