You can use a closure like:
document.getElementById('bt1').addEventListener('click',function() { foo(1);});
On 5/30/06, Michael Bar-David <[EMAIL PROTECTED]> wrote:
JS question:
I'm trying to work with addEventListener, to implement this code:
<input type='button' id='bt1' value='press me' onclick='foo(1)'/>
with JS:
document.getElementById('bt1').addEventListener('click',***);
what sould I write instaed of *** ?
(The problem is, how to pass the parameter to to function)
thanks
Michael Bar-David
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners
--
Hasta Otra
Ramiro Aparicio
---------------------------------------------------------------------------------
Webmaster de http://gs151.tk y http://www.climaxsl.es
Desarrollador de FoxGame http://foxgame.mozdev.org
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners