The problem arises because the event handler is bound every time page2.html is loaded. I would suggest that the page is loaded by Ajax? This means that every time the page loads, an event handler is added, and since it is still present in Ajax JavaScript event handlers. Event handlers are present until you delete them yourself with a full page reload.
The best solution is to only add an event handler once on your base page (the page that does all the ajax loading).
Another solution is to untie the old event handlers first and add new ones.
$("#tableId tr td").unbind('click').live('click'.....
Better yet, use the jQuery delegation method:
$("#tableId").die('click', 'tr td').live('click', 'tr td'.....
source share