+ 1
HTML Button for JS
Is there a button in HTML or JavaScript that activates something in JavaScript ? Example: Button(when clicked){ JavaScript: alert("Hello World") }
1 ответ
+ 12
Use the event property
https://www.sololearn.com/learn/JavaScript/2758/
your's is : 👇
<button onclick="alert('Hello World')">Click Me</button>