+ 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") }

30th Sep 2018, 4:55 AM
Carson
Carson - avatar
1 ответ
+ 12
Use the event property https://www.sololearn.com/learn/JavaScript/2758/ your's is : 👇 <button onclick="alert('Hello World')">Click Me</button>
30th Sep 2018, 6:15 AM
Jaydeep Khatri
Jaydeep Khatri - avatar