what is this onclick javascript code example
Example: javascript onclick
document.getElementById("myBtn").addEventListener("click", function() {
alert("Hello World!");
});
document.getElementById("myBtn").addEventListener("click", function() {
alert("Hello World!");
});