Guest User

Untitled

a guest
Apr 10th, 2016
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. document.addEventListener("DOMContentLoaded", function () {
  2.     "use strict";
  3.     var button,
  4.         count;
  5.  
  6.     button = document.getElementByName('btn');
  7.     count = 0;
  8.  
  9.     button.onclick = function () {
  10.         count += 1;
  11.         button.innerHTML = "Clicked " + count + " times";
  12.     };
  13. });
Advertisement
Add Comment
Please, Sign In to add comment