<script type="text/javascript">
window.onload= function Img() {
var com1=document.getElementById('btn7');
var com2=document.getElementById('btn8');
com1.onclick=com2.onclick = function() {
alert('778');
}
}
</script>
<input type="button" value="1" id=btn7>
<input type="button" value="2" id=btn8>