I have an object
<button id=summer>
Now I want to dynamically set an event for this object:
function foo()
{
}
myobject = document.getEle mentById("summe r");
myobject.onClic k = foo;
Problem is that I want to give the function an argument. "foo(this)" instead
of just "foo".
How can I achieve that?
Thanks,
Wim
<button id=summer>
Now I want to dynamically set an event for this object:
function foo()
{
}
myobject = document.getEle mentById("summe r");
myobject.onClic k = foo;
Problem is that I want to give the function an argument. "foo(this)" instead
of just "foo".
How can I achieve that?
Thanks,
Wim
Comment