<body>
<button id="btmCheckEmpty">Проверить</button>
<script contenteditable>
window.onload = function() {
document.getElementById("btmCheckEmpty").onclick = alert('кнопка нажата');
}
</script>
</body>
<body>
<button id="btmCheckEmpty">Проверить</button>
<script contenteditable>
window.onload = function() {
document.getElementById("btmCheckEmpty").addEventListener('click',function(){alert('кнопка нажата');});
}
</script>
</body>