G
Gu
hi to all!
i'm fairly new to javascript and even newer to OOP javascript
programming. now, i've come to a thing i consider strange, but maybe
it's just a simple mistake or something. this is the code:
<script language="javascript">
function legs(){
this.frontright="";
}
function animal(){
leg=new legs;
}
tiger=new animal;
tiger.leg.frontright="furry";
</script>
this does not work as leg.frontright is not defined. or this is what
the debugger says. any help?
tia
gus
i'm fairly new to javascript and even newer to OOP javascript
programming. now, i've come to a thing i consider strange, but maybe
it's just a simple mistake or something. this is the code:
<script language="javascript">
function legs(){
this.frontright="";
}
function animal(){
leg=new legs;
}
tiger=new animal;
tiger.leg.frontright="furry";
</script>
this does not work as leg.frontright is not defined. or this is what
the debugger says. any help?
tia
gus