[Project_owners] [JS] addEventListener function parameter

Michael Bar-David mbd1987 at gmail.com
Tue May 30 16:54:47 EDT 2006


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


More information about the Project_owners mailing list