рони,
примерно так:
table{border-collapse:collapse;border:solid black 1px;display:table;}
.edivedit{background-color:grey;height:100px;width:100px;}
<meta http-equiv = "Content-Type" content = "text/html" charset = "utf-8">
<link rel = "stylesheet" type = "text/css" href = "19.css">
<table><tbody>
<tr><td>1</td><td>1</td><td>1</td></tr>
<tr><td>2</td><td>2</td><td>2</td></tr>
<tr><td>3</td><td>3</td><td>3</td></tr>
</tbody></table>
<script src = "19.js" type = "text/javascript"></script>
document.getElementsByTagName('table')[0].onclick = getS;
var scrolledY = window.pageYOffset;
function getS(){
document.getElementsByTagName('table')[0].style.display = 'none';
var divforedit = document.createElement('div');
divforedit.className = 'edivedit';
divforedit.id = 'ediv';
document.body.appendChild (divforedit);
var ebutton = document.createElement('button');
//ebutton.className = 'button-' + buttonnames[i];
ebutton.id = 'ebutton';
ebutton.innerHTML = 'Exit';
divforedit.appendChild (ebutton);
document.getElementById('ebutton').onclick = exit;
}
function exit(scrolledY){
document.getElementById('ediv').remove();
document.getElementsByTagName('table')[0].style.display = 'table';
console.log(scrolledY);
}