What will the following code do when the button is pressed?
<button id="button">Press here</button>
document.getElementById('button').onclick = function() {
alert('You have pressed the button');
};
What will the following code do when the button is pressed?
<button id="button">Press here</button>
document.getElementById('button').onclick = function() {
alert('You have pressed the button');
};