+ 2
How do I make my buttons display in my output when I click on the button. Like my buttons value displaying using JavaScript.
Anytime I click on a button I want it's value displayed ony output.
1 Answer
+ 4
<button>3</button>
document.querySelector("button").onclick=(e)=>{
console.log(e.target.innerHTML);
}