+ 1
On click buttons
Can someone tell me how to make buttons have something when there clicked
2 Respostas
+ 5
<button onclick="function()">button</button>
U need to use javascript to declare the function to be executed when button is clicked .
+ 3
<button onclick="() => console.log('you clicked a button');"> click here </button>