L
Lee Atkinson
Hi
I have a some code for creating a new object. What I would like to do
is to to have the new object base on an HTML element, created in the
constructor, e.g:
function Foo() {
//constructor code, including creating custom properties, etc, but
also be able to set properties on an html div element
}
....
var myFoo = new Foo();
alert(myFoo.innertHTML);
I could, of course, have a property of the object that references a
newly-created element, but I would rather have just one object.
Is this possible?
Regards
Lee
I have a some code for creating a new object. What I would like to do
is to to have the new object base on an HTML element, created in the
constructor, e.g:
function Foo() {
//constructor code, including creating custom properties, etc, but
also be able to set properties on an html div element
}
....
var myFoo = new Foo();
alert(myFoo.innertHTML);
I could, of course, have a property of the object that references a
newly-created element, but I would rather have just one object.
Is this possible?
Regards
Lee