I have very simple html page with js code:
<
You'll have to do something like this:
btnShow.onclick = (function(opt) { return function() { showParam(opt); }; })(arrOptions[i]);