this
in you code not refer to the current element it refers to the window object.
HTML
Change
onclick="copyOutput()"
to
onclick="copyOutput(this)" //pass refer of the current element
js
function copyOutput(el) { //el get current element clicked
var output = $(el).closest('tr').find('td:eq(1)').text();
alert(output);
}