When I click on input button, I have nothing in Console, however I expect "Hello".
This is my code:
window.onload = function() {
const btn = document.getElementsByClassName('btn-next');
btn.onclick = function() {
btn.click();
console.log("Hello");
}
};
<input type="button" class="btn-next" value=">" />
What am I doing wrong?