If the DOM is identical on both pages, you can use the element's index in the DOM:
$("button").click(function() {
var position = $(this).index("body *");
// Send "position" to the server
...
}
On the receiving page, you can find the corresponding button with:
$("body *").eq(position);
The proper way to do the event delegation you asked about is:
$(document).on("mouseup mousedown click mousemove", "button,checkbox,option", function(e) {
var element = $(this).index("body *");
socket.emit("event", element, e);
});
Change the list of element types to all the ones that you need to catch clicks on.