A
Armel Asselin
Hello,
I'm working on a Javascript interpreter; when I execute this code I cannot
figure out why the inner "c" function returns the input widget as "this"...
could someone tell ??
<input type=button onclick="
function myobject(a) { function c() { return this; } var prop1=a;
this.youpla = c(); }
var i = new myobject();
alert(i.youpla.innerHTML);
" value="bonjour" />
the docs tells when calling "c( )" whithout "object." before it should pass
null as "this" but I get the widget ?
please help
Armel
I'm working on a Javascript interpreter; when I execute this code I cannot
figure out why the inner "c" function returns the input widget as "this"...
could someone tell ??
<input type=button onclick="
function myobject(a) { function c() { return this; } var prop1=a;
this.youpla = c(); }
var i = new myobject();
alert(i.youpla.innerHTML);
" value="bonjour" />
the docs tells when calling "c( )" whithout "object." before it should pass
null as "this" but I get the widget ?
please help
Armel