I know how to handle a link with an id:
var a = document.getElementById("mylink");
a.onclick = function() {
alert("ok");
};
But if I have 3 links within one class .lotsOfLinks and I want to handle each one just like I did with Id.
What's the best and short way?
Thank you.