Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.addEventListener("DOMContentLoaded", function () {
- "use strict";
- var button,
- count;
- button = document.getElementByName('btn');
- count = 0;
- button.onclick = function () {
- count += 1;
- button.innerHTML = "Clicked " + count + " times";
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment