javascript_extend.html
Dosyayı İndir
<HTML>
<head>
<script language="javascript">
function human(name,id){
this.name=name;
this.id=id;
}
function engineer(name,id,job){
this.job=job;
this.base=human;
this.base(name,2);
}
function ComputerEngineer(name,id){
var job="Bilgisayar Mühendisi";
this.job=job;
this.base=engineer;
this.base(name,id,job);
}
function yap(){
serhat=new ComputerEngineer("Serhat","2");
alert("Job: "+serhat.job+" Name: "+serhat.name+" Id: "+serhat.id);
}
</script>
<body>
<form>
<input type="button" onClick="yap()" value=" yap ">
</form>
</body>
</HTML>
Dosyayı İndir