Add parameters to an URL from a <a href> just clicked
<p>The scenario is a lot of html files with a lot more of links between them. When I call the first one of them (it would be the index), the link pass several parameters through the URL (we could call them preferences).</p>

<p>Now I want that, when clicking any of the several links of the page, those parameters would be added. So the problem would be similar to this other ( <a href="http://stackoverflow.com/questions/6953944/how-to-add-parameters-to-a-url-that-already-contains-other-parameters-and-maybe">How to add parameters to a URL that already contains other parameters and maybe an anchor</a>) but doing it just after clicking the link.</p>

<p>I know that one solution could be changing the <strong><em>onclick</em></strong> event on each link, but as there may be thousands of them, without a regular url format... I'm looking for a solution that could be on the script at the head; perhaps something relative to <strong><em>onbeforeunload</em></strong> event.</p>

<p>Anyway I couldn't find how to do it. Any ideas?</p>
