click button change innerHtml
Example-1:
const btn = document.querySelector(".btn");
const heading = document.querySelector(".heading");
btn.addEventListener("click", function () {
heading.innerHTML = "Hello";
});
Example-2:
_e('btn').addEventListener('click', function() {
_e('demo').innerHTML = 'Hey There';
}, false);
function _e(id) {
return document.getElementById(id);
}