<input type="button" id="boton"> <input type="button" onclick="elem.click()"> <script> elem=document.getElementById('boton'); elem.onclick = function () {alert(this.value)} </script>