<input type="button" value="1" id=btn7> <script type="text/javascript"> document.getElementById('btn7').onclick = function() { alert('Клик');} </script>