Hi all!
I am new forum user. My work is mainly in GIS programming (maps, routes, etc), more precisely i am developing a web map app.
I am trying to keep separated js code form HTML and CSS, but i have some problems that i cannot resolve, for example, when i use:
<a id="myID">Hello</a>
then in a js file i put:
var a = document.getElementById("myID");
a.onmousedown = myFunction;
myFunction() {
alert(this.id);
}
But the problem is, what if I want to pass more parametes than event or this, i mean, what if the function is myFunction(param1,param2,param3). How can i handle this?



Reply With Quote

Bookmarks