javascript on click button html code example
Example: javascript onclick button
var button = document.querySelector('button');
button.onclick = function() {
//do stuff
}
var button = document.querySelector('button');
button.onclick = function() {
//do stuff
}