function Parent(username)
{
this.username = username;
this.sayHello = function()
{
alert(this.username);
}
}
function Child(username,pwd)
{
Parent.call(this,username);
this.pwd = pwd;
this.sayPwd = function(){
alert(this.pwd);
}
}
var p = new Parent("admin123");
var c = new Child("admin1","admin12");
p.sayHello ();
c.sayHello ();
c.sayPwd ();